Releases: marcoroth/herb
Releases · marcoroth/herb
v0.9.1
Parser
- Support Action View tag helpers with inline blocks by @marcoroth in #1404
- Fix Action View Helpers with positional arguments and block by @marcoroth in #1406
Engine
- Make sure
validate_rubyalso works on older Rubies by @marcoroth in #1411 - Delegate
add_expression_blockfor Erubi compatibility by @marcoroth in #1417
Linter
- Warn about
j()inerb-no-unsafe-script-interpolationby @marcoroth in #1407 - Allow more types for
html-allowed-script-typerule by @marcoroth in #1413 - Support more cases for
erb-no-duplicate-branch-elementsby @marcoroth in #1415 - Re-export linter rule utils from
coreby @marcoroth in #1416
Linter Rules
New Rules
- Implement
actionview-no-silent-renderrule by @marcoroth in #1402 - Implement
erb-no-silent-statementrule by @marcoroth in #1403 - Implement
erb-no-empty-control-flowrule by @marcoroth in #1412
VS Code / Cursor
- Don't register Toggle Comment as global shortcut by @marcoroth in #1409
Dependencies
- Bump undici from 7.18.2 to 7.24.1 by @dependabot in #1378
- Bump nx from 22.4.4 to 22.5.4 by @dependabot in #1397
- Bump @rollup/plugin-commonjs from 29.0.0 to 29.0.2 by @dependabot in #1398
- Bump @types/vscode from 1.109.0 to 1.110.0 by @dependabot in #1399
Commits
Full Changelog: v0.9.0...v0.9.1
v0.9.0
Herb v0.9
Check out the "What's new in Herb v0.9" post on the Herb Blog.
Core
- Fix
TS2304: Cannot find name 'TextDecoder'error by @marcoroth in #1175 - Types: Add discriminated union support across language bindings by @marcoroth in #1154
- Implement
lex_fileandparse_filein language bindings by @marcoroth in #1325 - Expose
Herb.parse_pubyto parse Ruby with Prism by @marcoroth in #1353
Parser
- Fix ERB control flow tags in attribute positions by @marcoroth in #873
- Add
analyzeoption toparser_options_Tby @citizen428 in #1144 - Introduce
HTMLConditionalElementNodeby @marcoroth in #1146 - Make
parser_optionsparameterconstinherb_parseby @citizen428 in #1151 - Introduce
HTMLConditionalOpenTagNodeby @marcoroth in #1153 - Handle invalid HTML comment closing tag
--!>by @marcoroth in #1156 - Improve error recovery for unclosed open tags and unterminated quotes by @marcoroth in #1169
- Add
strictoption toparser_optionsby @marcoroth in #1171 - Improve error recovery for ERB tags by @marcoroth in #1170
- Introduce
HTMLOmittedCloseTagNodeandOmittedClosingTagErrorby @marcoroth in #1173 - Introduce
MissingAttributeValueErrorfor empty attribute values by @marcoroth in #1182 - Mention
strict: falseinOmittedClosingTagErrormessage by @marcoroth in #1189 - Don't treat backslash as escape character in attribute values by @marcoroth in #1213
- Fix regressions in analyzing conditional open tags by @marcoroth in #1208
- Store parser options on
ParseResultby @marcoroth in #1190 - Introduce
UnclosedCloseTagErrorby @marcoroth in #1216 - Improve ERB
casenode andendtag matching by @marcoroth in #1237 - Fix
ConditionalElementMultipleTagsErroron valid templates by @marcoroth in #1240 - Fix lambda block detection by @marcoroth in #1250
- Introduce
StrayERBClosingTagErrorby @marcoroth in #1256 - Friendly token names in Unexpected Token error messages by @marcoroth in #194
- Allow inline
case/whenandcase/inin strict mode by @marcoroth in #1263 - Rename
sourcetoelement_sourceforHTMLElementNodeby @marcoroth in #1331 - Analyze and transform Action View helpers by @marcoroth in #1347
- Expose Prism Nodes in Herb Syntax Tree by @marcoroth in #1350
- Detect
turbo_frame_taghelper by @marcoroth in #1354
Engine
- Turn on
strictby default by @marcoroth in #1184 - Fix ERB expression compilation when code contains a heredoc by @pinzonjulian in #1206
- Ensure Engine produces valid Ruby in test suite by @marcoroth in #1207
- Ensure
assert_evaluated_snapshotproduces valid Ruby in tests by @marcoroth in #1209 - Fix newline handling after heredoc terminators by @marcoroth in #1246
- Add support for disabling debug spans in
ERBBlockNodevia comments by @kozy4324 in #977 <%= -%>does not trim trailing newline by @joelhawksley in #1361- Inline comments on
<% end %>on output blocks produce invalid Ruby by @joelhawksley in #1363 - Whitespace stripped between HTML closing tag and ERB control tag by @joelhawksley in #1366
Formatter
- Make sure
herb-formatrespects.herb.ymlby @marcoroth in #1185 - Don't collapse multiple ERB expressions in block elements by @marcoroth in #1214
- Add
expectFormattedToMatchtest helper by @marcoroth in #1215 - Fix infinite loop when rendering multiple groups of adjacent inline elements by @ydah in #1008
- Fix ERB text flow formatting to keep adjacent inline elements together by @ydah in #1010
- Fix punctuation separating from ERB tags in mixed content by @marcoroth in #1266
- Extract Text Flow Engine by @marcoroth in #1267
- Extract Attribute Renderer by @marcoroth in #1269
- Extract Spacing Analyzer and Comment Helpers by @marcoroth in #1270
- Fix adjacent ERB tags in ERB block by @marcoroth in #1278
- Preserve user newlines in block elements with mixed content by @marcoroth in #1279
- Preserve content in
white-spacesignificant elements by @marcoroth in #1280 - Refactor Format Printer using
withInlineModeby @marcoroth in #1285 - Preserve user newlines for block elements with ERB children by @marcoroth in #1295
- Preserve user newlines for inline elements by @marcoroth in #1305
Linter
- Fix
html-no-empty-headingsto detect non-output ERB by @marcoroth in #1162 - Update
html-anchor-require-hrefwitherblint-githubinsights by @marcoroth in #1228 - Link Linter rule IDs to docs in CLI output by @marcoroth in #1241
- Improve colors in Linter CLI output by @marcoroth in #1242
- Link file paths in Linter CLI output by @marcoroth in #1243
- Make
RuleClass().namestatic by @citizen428 in #1268 - Fix false positive for dynamic IDs across separate ERB blocks by @marcoroth in #1299
- Access rule
typefrom class instead of instance by @marcoroth in #1298 - Accessibility rules should be warnings, not errors by @joelhawksley in #1066
- Improve
html-img-require-altrule by @marcoroth in #1311 - Move
pathto CLI-only bundle by @marcoroth in #1352 - Make
html-anchor-require-hrefAction View Helper aware by @marcoroth in #1367 - CLI: Implement a Linter Worker to parallelize file processing by @marcoroth in #1371
Linter Rules
New Rules
- Implement
erb-no-conditional-html-elementrule by @marcoroth in #1150 - Implement
html-no-aria-hidden-on-bodyrule by @marcoroth in #1163 - Implement
html-no-abstract-rolesrule by @marcoroth in #1164 - Implement
erb-no-trailing-whitespacerule by @markokajzer in #1168 - Implement
erb-no-conditional-open-tagrule by @markokajzer in #1200 - Implement
html-allowed-script-typerule by @markokajzer in #1201 - Implement
html-require-closing-tagsrule by @markokajzer in #1199 - Implement
turbo-permanent-require-idrule by @pardeyke in #1229 - Implement
erb-no-inline-case-conditionsrule by @marcoroth in #1265 - Implement
erb-no-interpolated-class-namesrule by @marcoroth in #1283 - Implement
erb-no-duplicate-branch-elementsrule by @marcoroth in #1301 - Implement
erb-no-then-in-control-flowrule by @marcoroth in #1309 - Implement
erb-no-statement-in-scriptrule by @marcoroth in #1330 - Implement
erb-no-javascript-tag-helperrule by @marcoroth in #1330 - Implement
erb-no-unsafe-script-interpolationrule by @marcoroth in #1330 - Implement
erb-no-raw-output-in-attribute-valuerule by @marcoroth in #1330 - Implement
erb-no-unsafe-rawrule by @marcoroth in #1330 - Implement
erb-no-unsafe-js-attributerule by @marcoroth in https://github.com/marcoroth/herb/pull/...
v0.8.10
Parser
- Upgrade Prism to v1.9.0 by @marcoroth in #1110
- Add error for case/when in same ERB tag by @tvararu in #1112
Engine
- Handle trailing comments in ERB output tags by @marcoroth in #1083
- Show component names in
DebugVisitorby @marcoroth in #1132
Linter
- Allow nested parens in
erb-strict-locals-comment-syntaxrule by @marcoroth in #1141
Formatter
- Fix heredoc formatting by @citizen428 in #1142
Dev Tools
- Show colored outlines in Herb Debug Menu by @marcoroth in #1133
Language Server
- Don't add
\nwhen formatting ranges by @marcoroth in #1126
libherb
- Mark certain targets as
.PHONYin Makefile by @citizen428 in #1118 - Change LLVM detection on macOS by @citizen428 in #1123
- Add test for
herb_read_fileby @citizen428 in #1127 - Remove old
visitsubcommand by @citizen428 in #1129 - Add
freecalls toprismcommand by @citizen428 in #1128 - Add default language case in
herb_extractby @citizen428 in #1131 - Introduce
string_equalsutility function by @citizen428 in #1130 - Simplify
main.cby @citizen428 in #1134 - Add support for
.envrc.localby @citizen428 in #1120
Dependencies
- Bump @typescript-eslint/parser from 8.53.1 to 8.54.0 by @dependabot[bot] in #1104
- Bump zod from 4.3.5 to 4.3.6 by @dependabot[bot] in #1105
- Bump playwright from 1.57.0 to 1.58.0 by @dependabot[bot] in #1103
- Bump @typescript-eslint/eslint-plugin from 8.53.1 to 8.54.0 by @dependabot[bot] in #1106
- Bump @shikijs/vitepress-twoslash from 3.21.0 to 3.22.0 by @dependabot[bot] in #1117
- Bump nx from 22.3.3 to 22.4.4 by @dependabot[bot] in #1116
- Bump rollup from 4.55.2 to 4.57.1 by @dependabot[bot] in #1115
- Bump playwright from 1.58.0 to 1.58.1 by @dependabot[bot] in #1114
- Bump vitepress from 2.0.0-alpha.15 to 2.0.0-alpha.16 by @dependabot[bot] in #1113
- Bump @types/vscode from 1.108.1 to 1.109.0 by @dependabot[bot] in #1138
- Bump prettier from 3.8.0 to 3.8.1 by @dependabot[bot] in #1140
- Bump @types/node from 25.0.10 to 25.2.2 by @dependabot[bot] in #1137
- Bump oxlint from 1.39.0 to 1.43.0 by @dependabot[bot] in #1136
- Bump eslint from 9.39.2 to 10.0.0 in /javascript/packages/vscode by @dependabot[bot] in #1135
- Bump @typescript-eslint/eslint-plugin from 8.54.0 to 8.55.0 by @dependabot[bot] in #1139
New Contributors
- @citizen428 made their first contribution in #1120
- @tvararu made their first contribution in #1112
Commits
Full Changelog: v0.8.9...v0.8.10
v0.8.9
Parser
- Fix
nextwithinifin single ERB tag by @marcoroth in #1100
Linter
- Catch
<%# locals:() %>inerb-strict-locals-comment-syntaxby @marcoroth in #1087
Playground
- Add option for Formatter
maxLineLengthby @marcoroth in #1101
Dependencies
- Bump rollup from 4.55.1 to 4.55.2 by @dependabot[bot] in #1091
- Bump prettier from 3.7.4 to 3.8.0 by @dependabot[bot] in #1089
- Bump vitepress-plugin-group-icons from 1.6.5 to 1.7.1 by @dependabot[bot] in #1092
- Bump @typescript-eslint/parser from 8.53.0 to 8.53.1 by @dependabot[bot] in #1090
- Bump @typescript-eslint/eslint-plugin from 8.51.0 to 8.53.1 by @dependabot[bot] in #1093
- Bump lodash-es from 4.17.21 to 4.17.23 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #1097
- Bump lodash from 4.17.21 to 4.17.23 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #1098
- Bump @types/node from 25.0.3 to 25.0.10 by @dependabot[bot] in #1107
Commits
Full Changelog: v0.8.8...v0.8.9
v0.8.8
Linter
- Add support for
--fix-unsafelyflag by @marcoroth in #1072 - Allow empty headings in
templateforhtml-no-empty-headingsby @marcoroth in #1073 - Fix
tinyglobbymigration issues in linter CLI by @marcoroth in #1074 - Allow
styleinsidesvgforhtml-head-only-elementsby @marcoroth in #1082
New Linter Rules
- Implement
erb-strict-locals-comment-syntaxrule to enforce Rails strict locals comment syntax by @ydah in #1049 - Implement
erb-strict-locals-requiredrule by @marcoroth in #1070
Formatter
- Preserve Unicode whitespace when formatting by @marcoroth in #1080
Language Server
- Fix
casewiththenbeing marked as unnecessary by @marcoroth in #1079
Ruby gem
- Improve native extension loading for preview versions by @marcoroth in #1081
Engine
- Exclude SVG and MathML contexts from DebugVisitor by @marcoroth in #1084
Visual Studio Code Extension
- Fix bundling of
fdirin CJS context by @marcoroth in #1071
Parser
- Prioritize blocks over
yieldin control flow detection by @marcoroth in #1076 - Add
then_keywordforif,unless,whenandinby @marcoroth in #1078 - Upgrade Prism to v1.8.0 by @marcoroth in #1067
libherb (WebAssembly)
- Build Optimizations by @marcoroth in #1075
Dependencies
- Bump oxlint from 1.37.0 to 1.39.0 by @dependabot[bot] in #1055
- Bump @shikijs/vitepress-twoslash from 3.20.0 to 3.21.0 by @dependabot[bot] in #1054
- Bump vite from 7.3.0 to 7.3.1 by @dependabot[bot] in #1053
- Bump @typescript-eslint/parser from 8.51.0 to 8.53.0 by @dependabot[bot] in #1057
- Bump undici from 7.15.0 to 7.18.2 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #1062
- Bump @types/vscode from 1.107.0 to 1.108.1 by @dependabot[bot] in #1056
Commits
Full Changelog: v0.8.7...v0.8.8
v0.8.7
Linter
- Improve
html-no-duplicate-attributeslinter rule to respect ERB Control Flow by @kudoas in #1014 - Add
--fail-leveloption to control exit code by @ydah in #1007
Dev Tools
libherb
- Revert lazy array initialization and restore
hb_array_size()usage by @marcoroth in #1025
Ruby
- Upgrade to Ruby 4 and
rake-compiler-docktov1.11.1by @marcoroth in #1012 - Add
irbtoGemfileby @kozy4324 in #1035 - Fix test failure caused by year change by @kozy4324 in #1031
JavaScript
- Use
tinyglobbyandpicomatchby @marcoroth in #843 - Bump
js-yaml,jws, andmdast-util-to-hastby @dependabot[bot] in #1028 - Upgrade NPM dependencies by @marcoroth in #1029
WASM
- Upgrade to C++17 for Embind compatibility by @marcoroth in #1026
Dependencies
- Bump rollup from 4.53.3 to 4.54.0 by @dependabot[bot] in #1019
- Bump express and @types/express by @dependabot[bot] in #1022
- Bump @typescript-eslint/parser from 8.41.0 to 8.50.1 by @dependabot[bot] in #1020
- Bump @types/vscode from 1.106.0 to 1.107.0 by @dependabot[bot] in #1021
- Bump qs from 6.14.0 to 6.14.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #1032
- Bump oxlint from 1.36.0 to 1.37.0 by @dependabot[bot] in #1042
- Bump rollup from 4.54.0 to 4.55.1 by @dependabot[bot] in #1039
- Bump @types/picomatch from 3.0.2 to 4.0.2 in /javascript/packages/config by @dependabot[bot] in #1038
- Bump @types/picomatch from 3.0.2 to 4.0.2 by @dependabot[bot] in #1040
- Bump @types/node from 20.19.27 to 25.0.3 by @dependabot[bot] in #1041
- Bump zod from 4.2.1 to 4.3.5 by @dependabot[bot] in #1043
Commits
Full Changelog: v0.8.6...v0.8.7
v0.8.6
Ruby
- Ruby v4.0 support by @marcoroth in #996
Parser
- Upgrade Prism to v1.7.0 by @marcoroth in #992
- Fix block detection to exclude closed brace blocks without yield by @ydah in #1009
Dev Tools
- Avoid overriding non-static position when attaching herb overlay by @kozy4324 in #999
- Ensure Herb overlay label is visible when attached to html element by @kozy4324 in #1000
libherb
- C: New
hb_arrayimplementation by @timkaechele in #782
Documentation
Dependencies
- Upgrade
rake-compiler-dockfor Ruby v4.0 support by @marcoroth in #996 - Bump
vitepressfrom2.0.0-alpha.12to2.0.0-alpha.15by @dependabot in #986 - Bump
oxlintfrom1.13.0to1.35.0by @dependabot in #1006 - Bump
@vscode/vscefrom3.6.0to3.7.1by @dependabot in #1002 - Bump
@shikijs/vitepress-twoslashfrom3.15.0to3.20.0by @dependabot in #1003 - Bump
@mapbox/node-pre-gypfrom2.0.0to2.0.3by @dependabot in #1004 - Bump
nxfrom22.1.3to22.3.3by @dependabot in #1005
New Contributors
Commits
Full Changelog: v0.8.5...v0.8.6
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