Herb v0.11
Herb v0.11 ships alongside ReActionView v0.6. Check out the "What's new in Herb v0.11" post on the Herb Blog.
Parser
- Introduce
ERBIterationBlockNodeanditeration_nodesoption by @marcoroth in #1912 - Introduce
HerbDirectiveNodeandHerbStateDirectiveNodeby @marcoroth in #2435 - Introduce
ERBCommentNodeby @marcoroth in #2605 - Introduce
XMLProcessingInstructionNodeby @marcoroth in #2266 - Add an
erb_openersoption for custom ERB tag openers by @marcoroth in #2487, #2491 and #2645 - Follow HTML5 tokenizer for attribute names/values and comments by @marcoroth in #2593
- Treat every raw text element, including
<textarea>, as raw text by @marcoroth in #2596 and #2601 - Treat
<title>content as text by @marcoroth in #2597 - Key foreign content on a kind and the element name by @marcoroth in #2598
- Count characters, not bytes, when computing columns by @marcoroth in #2442
- Convert dynamic boolean attributes to conditional attributes by @marcoroth in #2112
- Convert literals to static text in
transform_conditionalsby @marcoroth in #2302 - Don't transform locals that shadow Action View helpers by @marcoroth in #1900 and #2076
- Only analyze receiver-less
rendercalls as Action View renders by @marcoroth in #2071 - Don't flag
render layout:with a block as missing its block by @marcoroth in #2044 - Detect
stylesheet_link_taghelper by @marcoroth in #2083 - Split an ERB tag holding a
caseand its first condition by @marcoroth in #2629 - Split an ERB tag that continues and closes a control-flow block by @marcoroth in #2632
- Report an inline
case/inon one line in both parse modes by @marcoroth in #2630 - Only report
NestedCommentErrorin strict mode by @marcoroth in #2604 - Don't treat the ternary
?as athenkeyword by @marcoroth in #1976 - Improve error recovery for unterminated ERB tags by @marcoroth in #1970
- Fix crash on an unterminated control-flow tag by @marcoroth in #2657
- Allow an ERB delimiter inside a Ruby string by @marcoroth in #2656
- Add
track_locationsoption to skip source-location objects by @joelhawksley in #2199 - Count errors in
error_countso binding can skip the error walk by @joelhawksley in #2217
Engine
- Implement
ComponentVisitorby @marcoroth in #2032 - Add
AutoCloseOmittedTagsVisitorby @marcoroth in #1188 - Add
ContentForVisitorand removecontent_for_headoption by @marcoroth in #2075 - Implement
RemoveCommentsVisitorby @marcoroth in #2438 - Introduce
SourceAttributionVisitorby @marcoroth in #2447 and #2611 - Add
HTMLSafeAssertionsVisitorand parser option requirements by @marcoroth in #2151 and #2178 - Introduce
Herb::Diagnosticand make reporting a visitor mixin by @marcoroth in #2173 - Run validators as visitors on an ordered
VisitorStackby @marcoroth in #2174 - Deliver diagnostics to the browser in one payload by @marcoroth in #2175
- Make validation, debug, and optimization opt-in visitors by @marcoroth in #2079
- Introduce
VisitorContextfor transform visitors by @marcoroth in #2163 - Add
Stack.arrangeto order visitors from what they declare by @marcoroth in #2586 - Implement
InlineRenderVisitorto inline static partials by @marcoroth in #1666 - Introduce
CSSInliner::Visitorfor inlining CSS into[style]by @marcoroth in #2455 - Mark
InlineRenderandCSSInlineras experimental by @marcoroth in #2640 - Let a subclass choose which compiler walks the AST by @marcoroth in #2239
- Introduce
DynamicsCompilerto compile only dynamic values by @marcoroth in #2240 - Introduce
SubtreeCompilerto compile part of a template by @marcoroth in #2241 - Introduce
SlotVisitorfor slot markers by @marcoroth in #1986, #2582 and #2584 - Add
clientslot mode that parks every conditional branch by @marcoroth in #2268 and #2441 - Introduce
SlotSubtreeto render the markup a slot covers by @marcoroth in #2283 - Park a collection's item template on every render by @marcoroth in #2329
- Key a collection whose rows are built by a tag helper by @marcoroth in #2271
- Report template values as payload that names where they belong by @marcoroth in #2273
- Refuse two named elements claiming one slot by @marcoroth in #2363
- Compile mixed rcdata to parts and diagnose slots by @marcoroth in #2512
- Compile a template's slot schema without rendering it by @marcoroth in #2513
- Anchor a slot on an element opened across a conditional by @marcoroth in #2612
- Keep a block slot's body unescaped when a helper captures it by @marcoroth in #2699
- Rework slots so each file has one job, and report compile errors as diagnostics by @marcoroth in #2420
- Introduce a
keyedslot type and compile a standaloneherb-keyelement to it by @marcoroth in #2577 and #2578 - Introduce
<Fragment>and<Fallback>built-in components by @marcoroth in #2564, #2576 and #2654 - Introduce deferred
<Async>and<Lazy>built-in components by @marcoroth in #2565 - Generate built-in components from
config/by @marcoroth in #2583 - Fan out a state read in an interpolated attribute by @marcoroth in #2365
- Read a state through
unlesswith inverted arms by @marcoroth in #2371 - Compare states with ordered, negated, and state-to-state operators by @marcoroth in #2372
- Combine state conditions with
&&and||by @marcoroth in #2373 - Derive a state from the states it reads by @marcoroth in #2375
- Count items into a state with a template fold by @marcoroth in #2376
- Slot a state read inside a tag helper attribute by @marcoroth in #2378
- Ship state manifests for every rendered partial by @marcoroth in #2364
- Ship seeded state values with the render by @marcoroth in #2379, #2382 and #2386
- Point
herb:statediagnostics at the part that is wrong by @marcoroth in #2431 and #2470 - Refuse
herb:stateconditions that are always true or false by @marcoroth in #2505 - Resolve
herb:statereads from Prism nodes by @marcoroth in #2506 - Use
HerbStateDirectiveNodeinstead of reparsing signatures by @marcoroth in #2444 - Let a values request steer state initialization by @marcoroth in #2554
- Evaluate an attribute value conditional as the attribute's value by @marcoroth in #2563
- Bind a partial's states to its caller through
state:on render by @marcoroth in #2650, #2651 and #2652 - Resolve partials through a
resolveron the context by @marcoroth in #2649 - Implement
<style scoped>to scope a<style>to the file it was written in by @marcoroth in #2399, #2404, #2453, #2454 and #2477 - Keep a template's line numbers in the code it compiles to, matching Erubi by @marcoroth and @joelhawksley in #1546, #1555, #2479, #2480, #2482, #2483, #2484, #2486, #2488, #2489, #2490, #2493, #2496, #2498, #2500, #2503, #2508, #2509, #2519, #2520 and #2526
- Support Erubi's
trimoption by @marcoroth in #2391 - Support Erubi's
literal_prefixandliteral_postfixby @marcoroth in #2647 - Emit escaped ERB control flow as literal text by @marcoroth in #2628
- Keep the whitespace a template puts between attributes by @marcoroth in #2309
- Keep the indentation of a first-line tag that has trailing content by @marcoroth in #2642
- Fold literal output, static branches and static subtrees in
OptimizeVisitorby @marcoroth in #2494, #2497, #2499 and #2507 - Emit only the Ruby a compiled template actually needs by @marcoroth in #2291
- Skip location tracking when nothing asks for it by @marcoroth in #2317
- Single-pass
optimize_tokensby @joelhawksley in #2232 - Use
String#match?for the compiler's regexp guards by @joelhawksley and @marcoroth in #2235 and #2250 - Compute relative file paths and the project path lazily by @joelhawksley and @marcoroth in #2262 and #2310
- Scan for trailing whitespace instead of matching it by @marcoroth in #2495
- Emit render tags when
render_nodesis enabled by @marcoroth in #2176 - Instrument every ERB tag and measure what each one observed by @marcoroth in #2177
- Build a render tree and annotate what a producer measured by @marcoroth in #2180
- Report Action View helpers that were overwritten after being compiled away by @marcoroth in #2179
- Let producers register runtime measurements by @marcoroth in #2529
- Introduce
Runtime::Journalto record what a template did in a request by @marcoroth in #2531 and #2532 - Add
capture_outputto record what an output tag rendered by @marcoroth in #2533 - Reach the report session from the fiber a render happens in by @marcoroth in #2396
- Give the report channels for what a page collects by @marcoroth in #2398
- Serve a compile error page the Dev Tools can boot into by @marcoroth in #2414
- Retire the highlighter shell-out for compile errors by @marcoroth in #2425
- Raise
CompilationErroras aSyntaxErrorby @marcoroth in #2608 and #2700 - Move the generator template guard into a validator by @marcoroth in #2392
- Use
Location.zeroandToken.frominDebugVisitorby @marcoroth in #2053
Formatter
- Add
indentStyleto allow formatting using tabs by @brandonweiss and @marcoroth in #2114 and #2220 - Wrap attributes based on
maxLineLengthonly by @andy-rootly in #1834 - Preserve user newlines for inline elements by @marcoroth in #1949
- Don't insert a blank line before a trailing comment by @marcoroth in #1950
- Preserve indentation of nested multi-line HTML comments by @marcoroth in #1998
- Preserve inline whitespace in ERB branches by @marcoroth in #2015
- Preserve author-expanded multi-line ERB tags by @G-Rath in #2059
- Allow two blank lines as an intentional wider break by @marcoroth in #2121
- Fix attribute spacing lost on elements nested in ERB blocks by @vjymisal0 in #2148
- Keep Ruby
=begin/=endblock-comment delimiters in column 0 by @jaideeppyne in #2407 - Rewrite a
casesharing an ERB tag with its first condition by @marcoroth in #2631 - Keep a heredoc closing tag off the terminator line by @marcoroth in #2648
- Don't read from stdin for
--checkor when it's not a pipe, file, or socket by @marcoroth in #1955 and #2120 - Report skipped files and align CLI summary with
herb-lintby @marcoroth in #1991
Linter
- Lint a rendered page in the browser by @marcoroth in #2478, #2481 and #2568
- Add
defaultEnabledInso version gate sees re-enabled rules by @marcoroth in #2613 - Extend
herb:disablewith per-rule counts by @joelhawksley in #2351 - Make cleanup rules less intrusive in the editor by @marcoroth in #1965
- Scope Action View specific rules to
actionviewoption by @marcoroth in #2223 - Respect
frameworkwhen parsing Action View helpers by @marcoroth in #2265 - Make element context rules aware of where a file is rendered by @marcoroth in #2095
- Export every registered rule from the package entrypoint by @marcoroth in #2102
- Move shared rule utilities into
src/utils/by @marcoroth in #2320 - Fix rule gaps behind skipped and failing tests by @marcoroth in #2146
- Add
dedentas an explicit dependency by @jleo3 in #2214 - Remove Yeoman rule generator by @marcoroth in #2025
- Fix
html-no-duplicate-idsfor interpolated helper IDs by @marcoroth in #1940 - Update
html-no-duplicate-idsto useERBIterationBlockNodeby @marcoroth in #1913 - Update
erb-no-output-control-flowto useERBIterationBlockNodeby @marcoroth in #1914 - Improve
erb-no-output-control-flowoffense message by @marcoroth in #2008 - Update
erb-no-output-control-flowmessage for end tags by @akira-in-tech in #2205 - Don't flag consumed helper in
actionview-no-silent-helperby @marcoroth in #1971 - Cover Component slot setters in
actionview-no-silent-helperby @marcoroth in #2616 - Don't flag
caseoperands inerb-no-unused-literalsby @marcoroth in #1978 - Don't flag conditional predicates in
erb-no-unused-literalsby @viktorianer in #2637 - Don't flag String literals in
erb-no-unsafe-rawby @marcoroth in #2031 - Improve unextractable tags in
erb-no-duplicate-branch-elementsby @marcoroth in #2033 - Fix
erb-no-duplicate-branch-elementsautofixes by @marcoroth in #2051 - Fix
erb-no-trailing-whitespaceautofix inside HTML tags by @marcoroth in #2016 - Improve
erb-no-unused-expressionsoffense message by @marcoroth in #2038 - Allow attribute writes in
erb-no-unused-expressionsby @marcoroth in #2511 - Allow slot setters on block local in
erb-no-unused-expressionsby @marcoroth in #2602 - Improve
erb-no-instance-variables-in-partialsoffense message by @marcoroth in #2046 - Show
erb-prefer-direct-outputrewrite in offense message by @AG0708 in #2193 - Don't flag empty
data-*values in Action View tag helpers by @marcoroth in #2024 - Make more attribute rules Action View Helpers aware by @marcoroth in #2004
- Restrict
erb-prefer-image-tag-helperto Action View by @marcoroth in #2078 - Make
erb-no-conditional-html-elementframework aware by @marcoroth in #2641 - Don't flag ERB string literals that can't be inlined safely by @marcoroth in #2129
- Point strict locals offenses at the declaration they violate by @marcoroth in #2098
- Infer strict locals from call sites in
erb-strict-locals-requiredby @marcoroth in #2103 - Point
erb-strict-locals-requiredat the first line of the file by @marcoroth in #2147 - Don't report duplicate strict locals diagnostics by @AG0708 in #2252
- Improve locations for
erb-strict-locals-comment-syntaxby @marcoroth in #2267 - Apply the strict locals rules to every template by @marcoroth in #2614
- Allow a combined state condition in a boolean attribute by @marcoroth in #2385
- Don't flag external scripts in
html-require-script-nonceby @manrods in #2253 - Fix SVG false positives in
html-no-block-inside-inlineby @FrancescoK in #2411 - Let user
files.includeoverride default excludes by @joelhawksley in #2406
Linter Rules
New Rules
- Implement
actionview-no-helper-shadowingrule by @marcoroth in #1897 and #2133 - Implement
actionview-prefer-pluralize-helperrule by @joaoGabriel55 in #1868 - Implement
actionview-prefer-collection-renderrule by @marcoroth in #1957 and #1997 - Implement
actionview-no-unnecessary-html-saferule by @marcoroth in #2007 - Implement
actionview-no-unused-strict-localsrule by @marcoroth in #2012 - Implement
actionview-no-redundant-local-assignsrule by @marcoroth in #2014 - Implement
actionview-no-implicit-polymorphic-urlrule by @marcoroth in #2017, #2054 and #2131 - Implement
actionview-no-strict-locals-errorrule by @marcoroth in #2060 - Implement
actionview-no-render-option-shadowingrule by @marcoroth in #2065 - Implement
actionview-no-dynamic-partial-pathrule by @marcoroth in #2066 - Implement
actionview-prefer-qualified-partial-pathrule by @marcoroth in #2067 and #2132 - Implement
actionview-no-implicit-partialrule by @marcoroth and @luantaraschi in #2068 and #2197 - Implement
actionview-no-content-argument-with-blockrule by @marcoroth in #2139 - Implement
actionview-prefer-link-to-helperrule by @marcoroth in #2143 - Implement
actionview-no-mistyped-localsrule by @marcoroth in #2344 - Implement
actionview-prefer-form-withrule by @marcoroth in #2646 - Implement
erb-no-unused-block-argumentrule by @marcoroth in #1958, #1962, #1968, #1992 and #2003 - Implement
erb-prefer-each-over-maprule by @marcoroth in #1959 - Implement
erb-no-shadowed-block-argumentrule by @marcoroth in #1960 - Implement
erb-prefer-explicit-conditionalsrule by @marcoroth in #1969 - Implement
erb-prefer-do-end-blocksrule by @marcoroth in #1973 - Implement
erb-no-sleeprule by @marcoroth in #2023 - Implement
erb-no-unused-local-variablerule by @marcoroth in #2074 and #2161 - Implement
erb-no-byte-order-markrule by @marcoroth in #2149 - Implement
erb-no-class-definitionsrule by @markokajzer in #2171 - Implement
erb-no-module-definitionsrule by @markokajzer in #2170 - Implement
erb-no-method-definitionsrule by @markokajzer in #2172 - Implement
erb-no-returnrule by @markokajzer in #2183 - Implement
erb-no-multiple-statementsrule by @marcoroth in #1573, #2634 and #2644 - Implement
erb-closing-tag-indentrule by @markokajzer in #1445 - Implement
turbo-permanent-no-misleading-valuerule by @cb341 and @marcoroth in #677 and #1967 - Implement
ujs-*rules for deprecated@rails/ujsattributes by @marcoroth in #2057 and #2136 - Implement
html-no-nested-formsrule by @irinanazarova in #1961 - Implement
html-no-event-handler-attributesandhtml-no-inline-script-elementsrules by @markokajzer and @marcoroth in #1536 and #2077 - Implement
html-no-style-attributesandhtml-no-style-elementsrules by @markokajzer in #1539 - Implement
html-no-literal-nbsprule by @marcoroth in #2152 - Implement
html-attribute-name-valid-charactersrule by @marcoroth in #2594 - Implement
html-no-obsolete-tagsrule by @marcoroth in #2619 - Implement
svg-no-deprecated-tagsrule by @alloutflo in #2109 - Implement
a11y-no-visually-hidden-interactive-elementsrule by @joelhawksley and @marcoroth in #1671 and #2127 - Implement
herb-config-framework-optionrule by @marcoroth in #2135 - Implement linter rules for slots, state and actions by @marcoroth in #2343, #2366, #2433, #2698 and #2701
- Implement
herb:slotsandherb:statehygiene rules by @marcoroth in #2374 - Implement
herb-state-no-server-writesrule by @marcoroth in #2377 - Implement
herb-state-directive-syntaxrule by @marcoroth in #2445 - Implement
herb-state-no-shadowed-statesrule by @marcoroth in #2567 - Implement
herb-component-requires-slotsrule by @marcoroth in #2571 - Implement
herb-slots-valid-componentsrule by @marcoroth in #2572 - Implement
herb-state-requires-slotsrule by @marcoroth in #2573 - Implement
herb-slots-single-directiverule by @marcoroth in #2574 - Implement
<style scoped>rules by @marcoroth in #2401 and #2471 - Detect unused selectors and empty rules in
<style>blocks by @marcoroth in #2402
Autofixes
- Implement autofix for
erb-no-output-control-flowby @marcoroth in #2010 - Fix
erb-strict-locals-comment-syntaxand implement autofix by @marcoroth in #2096
Linter CLI
- Implement
--log-levelflag and improve summary output by @marcoroth in #1966 and #2006 - Add
--show-fix-diffflag to show autofix diff in CLI output by @marcoroth in #1572 - Keep partial index current when autofix rewrites a partial by @marcoroth in #2072
- Add a hint when no rules are enabled by @marcoroth in #1963
- Preserve spacing in new rule hints by @joeeei11 in #2022
- Don't lint every file twice when running
--fixby @marcoroth in #2206 - Fix
herb-formatandherb-lintwhen run from git hooks by @marcoroth in #2126
Config
- Add
allpseudo rule to set the default and severity for every linter rule by @marcoroth in #1954 and #2443 - Support YAML anchors, aliases and merge keys in
.herb.ymlby @matiasleidemer and @marcoroth in #1632, #2036 and #2037 - Always produce loadable YAML when mutating
.herb.ymlby @marcoroth in #2034 - Report when a wrongly named config file is present by @marcoroth in #1996 and #2001
- Explain version skew when
.herb.ymlfails validation by @marcoroth in #1941 - Don't validate the options under the
enginekey by @marcoroth in #2000 - Move the editor setting defaults out of the language server by @marcoroth in #2323
Language Server
- Add workspace and multi-project support by @marcoroth in #2113, #2157 and #2159
- Implement Completion Provider by @marcoroth in #1368
- Implement
Extract to Partialcode action by @marcoroth in #2042 - Implement Definition Provider for
renderpartials by @marcoroth in #2045 - Implement hover for
renderpartials by @marcoroth in #2049 - Implement
textDocument/referencesfor partials by @marcoroth in #2106 - Auto-complete partial names and
<%= render %>options by @marcoroth in #2108 - Implement Document Symbol Provider by @marcoroth in #2123
- Implement
textDocument/onTypeFormattingfor ERB block closers by @joaoGabriel55 in #2195 - Maintain partial index for cross-file diagnostics by @marcoroth in #2062
- Pass the partial caller index to cross-file linter rules by @marcoroth in #2118
- Point diagnostics at the call sites that caused them by @marcoroth in #2140
- Clear stale diagnostics and skip files outside workspace by @marcoroth in #2110
- Parse document with its own project's parser options by @marcoroth in #2638
- Give the editor's linter the project's whole config by @marcoroth in #2643
- Show what the application recorded from its journal by @marcoroth in #2534
- Rename classes to match LSP vocabulary and split Settings by @marcoroth in #2158
- Fix opening
.herb.ymlin remote workspaces by @marcoroth in #2305 - Handle declined capability registrations by @marcoroth in #2702
- Include build time in local dev build version by @marcoroth in #2169
Language Service
- Move editor-agnostic providers out of the language server by @marcoroth in #2162 and #2186
- Implement Inlay Hints by @marcoroth in #1328
- Implement Selection Ranges by @marcoroth in #2210
- Implement
documentHighlightfor strict and block locals by @marcoroth in #2208 - Complete the arguments a helper yields to its block by @marcoroth in #2156 and #2166
- Support
herb:stateand thedata-herb-*attributes by @marcoroth in #2369 and #2703 - Add hover support for
<style scoped>by @marcoroth in #2403 and #2475 - Resolve partials against the view root the index found by @marcoroth in #2184
- Change Action View Code Action to only rewrite the selected element by @jaideeppyne in #2207
- Respect configured
frameworkin Action View features by @marcoroth in #2264 - Don't mutate the parse tree when hovering or commenting by @marcoroth in #2204
- Cache parse results in
ParserServiceby @marcoroth in #2658
Analysis
- Implement
@herb-tools/analysispackage by @marcoroth in #2168 - Template dependencies, state tracing, and partial resolution by @marcoroth in #1667
- Introduce
ProjectIndexas the front door to a project's indexes by @marcoroth in #2185 - Rename
PartialCallerIndextoRenderGraphand answer both directions by @marcoroth in #2190 - Collect what state a template depends on by @marcoroth in #2187
- Work out which templates a state change affects by @marcoroth in #2188
- Map state down to the nodes that read it by @marcoroth in #2189
- Number a node the way
SlotVisitorandSubtreeCompilerdo by @marcoroth in #2279 - Introduce
SlotDependenciesto say which state a slot reads by @marcoroth in #2280 - Carry a page's state into the partials that render it by @marcoroth in #2281
- Follow state through block parameters and the locals it is assigned to by @marcoroth in #2288 and #2289
- Never call a constant an identity once the map travels by @marcoroth in #2290
- Build the slot dependency map the way the host compiled the page by @marcoroth in #2293
- Tell a loop apart from a block that runs once by @marcoroth in #2296
- Don't treat a name in a string literal as a reference by @marcoroth in #2639
Core
- Implement Action View Partial Resolution by @marcoroth in #2058
- Introduce Action View Partial Index by @marcoroth in #2061
- Introduce Action View partial caller index by @marcoroth in #2080 and #2111
- Introduce
buildfactories for AST nodes by @marcoroth in #2064 - Rename
Rangefields fromstart/endtofrom/toby @marcoroth in #2313 - Type
size_terror fields asnumberby @marcoroth in #2581 - Give
isHTMLNodethe same shape asisERBNodeby @marcoroth in #2610
Herb
- Introduce
LocateandSourcePath, and addlocateon nodes and parse results by @marcoroth in #2452 and #2466 - Derive the ERB node group from the tag tokens by @marcoroth in #2606
- Generate Parser Options from
config.ymlby @marcoroth in #1833 - Generate the whitespace preserving element list from config by @marcoroth in #2627
Action View
- Track what every helper yields to its block by @marcoroth in #2002
- Add helpers from the
importmap-railsgem by @marcoroth in #2005 - Don't treat form builder helpers as top-level helpers by @marcoroth in #2141
Client
- Introduce
@herb-tools/clientto index a template's slots by @marcoroth in #2272 - Apply payload and report what values alone could not do by @marcoroth in #2274
- Properly address a slot inside markup a helper like
content_forcaptured by @marcoroth in #2275 - Add, remove, reorder and re-key a collection's items by @marcoroth in #2276, #2278, #2331 and #2332
- Add
stateto set a page's state and write what it can by @marcoroth in #2282 - Write what the page owns now, and debounce only the request by @marcoroth in #2292
- Tell a page's own state from a command by @marcoroth in #2295
- Let a branch be switched from the client by @marcoroth in #2300
- Let a template name a slot with
data-herb-nameby @marcoroth in #2330 - Make every slot write reversible by @marcoroth in #2333 and #2361
- Introduce
herb:statefor client-owned template state by @marcoroth in #2334, #2335, #2370 and #2384 - Bind a form control to the state it renders by @marcoroth in #2336 and #2383
- Send a mutation without cancelling the one before it by @marcoroth in #2337
- Report what the runtime declined to do by @marcoroth in #2338
- Drive state from
data-herb-*action attributes by @marcoroth in #2341, #2558 and #2559 - Drive a boolean attribute's presence from state by @marcoroth in #2345
- Make a form an optimistic send without a controller by @marcoroth in #2347
- Reconstruct interpolated attributes from parked parts by @marcoroth in #2348
- Queue diagnostics for a late panel and report ambiguous confirms by @marcoroth in #2362
- Track the branch a collection item's conditional rendered by @marcoroth in #2381
- Settle the markup a client builds for itself by @marcoroth in #2387
- Settle a shown branch from its slot, not from the DOM by @marcoroth in #2448
- Generate state kinds and comparison operators from one definition by @marcoroth in #2449
- Support predicates, transforms and negation in
herb:statereads by @marcoroth in #2450 and #2467 - Keep state authoritative across rebuilds and payloads by @marcoroth in #2514
- Refetch server-derived slot values in production by @marcoroth in #2555 and #2556
- Unroll server-rendered branches from the values payload by @marcoroth in #2557
- Read a negated presence right when hydrating a state by @marcoroth in #2560
- Focus an autofocus element when its branch materializes by @marcoroth in #2562
- Fetch deferred blocks in parallel and let them
pollby @marcoroth in #2566, #2579 and #2580 - Animate slot updates with
data-herb-transitionby @marcoroth in #2575 - Settle request's own waiters and evaluate derived transforms by @marcoroth in #2591
- Add behaviors with lifecycle, transition and leave hooks by @marcoroth in #2615
Dev Tools
- Implement Runtime Diagnostics Panel and Reporting API by @marcoroth in #2327, #2380, #2410 and #2413
- Implement full-screen overlays for the Diagnostics Panel by @marcoroth in #2409
- Show a file's offenses in one block instead of one card each by @marcoroth in #2415
- Retire the error overlay in favor of the diagnostics panel by @marcoroth in #2424
- Show compile diagnostic with the source by @marcoroth in #2428
- Announce a fixed file, so a page that did not start the client can act on it by @marcoroth in #2429
- Redesign the diagnostics panel and the dev tools menu by @marcoroth in #2432 and #2446
- Show what a slot update changed, and where by @marcoroth in #2277, #2299, #2303 and #2523
- Choose which metrics the runtime panel shows by @marcoroth in #2537
- Point the render stack at what it rendered by @marcoroth in #2538
- Show what a tag rendered as a value, not an error by @marcoroth in #2539
- Show what a finding holds, not only its headline by @marcoroth in #2540
- Put what a file measured on its outline by @marcoroth in #2541
- Resolve template edits at the cheapest tier by @marcoroth in #2516
- Show
bundle exec herb devwhen server is unreachable by @marcoroth in #2518 - Show the application backtrace when a re-render raises by @marcoroth in #2522
- Key locationless diagnostics by message by @marcoroth in #2569
- Replace the NUL separator in
diagnosticKeywith JSON by @marcoroth in #2527 - Fold dev server client into dev tools by @marcoroth in #2255
- Fix
documentevent listener leaks across Turbo navigations by @marcoroth in #2081 - Don't log on every page load when there are no errors by @marcoroth in #2082
- Fix outlines breaking and littering the page by @eglitobias in #2659
Dev Server
- Push compiled schemas over a two-way protocol by @marcoroth in #2515
- Let a host narrow the watched directories by @marcoroth in #2524
- Refresh stylesheets and reload on rebuilt JavaScript by @marcoroth in #2525
- Detect already broken templates and show their diagnostics on connect by @marcoroth in #2528 and #2585
- Attribute a finding to whoever found it by @marcoroth in #2436
- Make server output work in non-interactive terminals by @marcoroth in #2468
- Use
Herb::Diagnostic::Formatterto log errors by @marcoroth in #2469
Highlighter
- Implement syntax-highlighted diff rendering by @marcoroth in #2035
- Implement
<herb-ansi>for rendering the output in the browser by @marcoroth in #2211 - Split the browser and Node entry points by @marcoroth in #2224
- Link the marked line numbers to the file, with a
linkResolveroption onANSIConverterby @marcoroth in #2324 and #2325 - Mark every line of a multi-line offense output by @marcoroth in #1999
- Color
<%#and its content as a comment by @alexsmolya in #2440
Minifier
- Introduce
@herb-tools/minifierpackage by @marcoroth in #788
Playground
- Add
Autofixtab by @marcoroth in #1974 and #2052 - Wire in the Language Service by @marcoroth in #2202
- Move analysis off main thread and virtualize the parse tree by @marcoroth in #2209
- Add
frameworkselector to the Diagnostics panel by @marcoroth in #2144 - Render Printer differences with Highlighter by @w3lld1 in #2218
- Throttle URL updates to avoid
replaceStatelimit by @marcoroth in #2013 - Fix parser diagnostic codes in production builds by @marcoroth in #2154
- Fix nx build configuration and declare missing dependencies by @marcoroth in #2056
- Remove unused
expressand@vitejs/plugin-vuedeps by @marcoroth in #2027
Rewriter
- Import the package's own source in its loader test by @marcoroth in #2390
Tailwind Class Sorter
Diff Engine
- Don't emit a changeset for insignificant whitespace changes by @marcoroth in #2009
Ruby
- Release the GVL during native parsing by @joelhawksley in #2263
- Intern token and AST node type strings by @joelhawksley and @marcoroth in #2234 and #2349
- Trim what
require "herb"loads, and tidy the gem's layout by @marcoroth in #2198 - Introduce
Herb::Fingerprintand record a template's digest by @marcoroth in #2530 - Generate
buildfactories for AST nodes by @marcoroth in #2055 - Add
zeromethods forLocation,PositionandRangeby @marcoroth in #1979 - Add
htmltoHerb::ParserOptionsby @marcoroth in #2393 - Generate HTML element registry and boolean attributes from config by @marcoroth in #2617
- Find files through
ConfigurationinProject/RenderAnalyzerby @marcoroth in #2201 - Don't load
bundler/inlinewhen gems are already installed by @marcoroth in #2125 - Find a Prism that carries its C sources when building from git by @marcoroth in #2476
- Restore Prism default for starting line count by @radanskoric in #2695
- Strip leftover RBS type alias fragment from errors template by @marcoroth in #2408
- Reform RBS signatures of
lex_fileandparse_fileby @elizamarcum in https://github.com/marcoroth/herb/pull/2233 - Fix running
bundle consoleby @joaoGabriel55 in https://github.com/marcoroth/herb/pull/2040 - Update
rbsandrbs_collectionby @marcoroth in https://github.com/marcoroth/herb/pull/1984 - Upgrade Steep to 2.1 and RBS to 4.2 by @marcoroth in https://github.com/marcoroth/herb/pull/2551
- Add
rubocop-performanceby @davidenglishmusic in https://github.com/marcoroth/herb/pull/2502 - Implement
Herb/IncludesAssertionRuboCop cop by @marcoroth in https://github.com/marcoroth/herb/pull/2397 - Replace
assert_includesassertions with snapshots by @marcoroth in #2618, #2620 and #2635 - Run every test with
rake testby @marcoroth in https://github.com/marcoroth/herb/pull/2439
Ruby CLI
- Support
--slotson compile and render by @marcoroth in https://github.com/marcoroth/herb/pull/2269
Rust
- Implement
herb-printerfor printing a Herb AST back to source by @marcoroth in https://github.com/marcoroth/herb/pull/1921 - Implement
herb-highlightercrate by @marcoroth in https://github.com/marcoroth/herb/pull/2115 - Implement
herb-analysiscrate based on Rubydex by @marcoroth in #1993 and #2228 - Index
herb:statedeclarations like locals by @marcoroth in https://github.com/marcoroth/herb/pull/2367 - Deserialize Prism Nodes from serialized payload by @marcoroth in https://github.com/marcoroth/herb/pull/2047
- Add
colorandclifeatures by @marcoroth in https://github.com/marcoroth/herb/pull/1952 - Remove unused
libcdependency by @marcoroth in https://github.com/marcoroth/herb/pull/1948 - Also run
make testwithout--all-featuresby @marcoroth in https://github.com/marcoroth/herb/pull/1975
Java
- Fix the build so it actually compiles and runs the tests by @marcoroth in https://github.com/marcoroth/herb/pull/2153
Visual Studio Code Extension
- Draw what an ERB tag rendered over the tag by @marcoroth in https://github.com/marcoroth/herb/pull/2535
- Stop charging Node startup to the Project Analysis timeout by @assirims in https://github.com/marcoroth/herb/pull/2553
- Bundle
vscode-html-languageservicefrom its ESM entry by @marcoroth in https://github.com/marcoroth/herb/pull/2321 - Lock
@types/vscodeto^1.100.0by @marcoroth in https://github.com/marcoroth/herb/pull/1933 - Drop
@vscode/vscedevDependency in favor ofnpxby @marcoroth in https://github.com/marcoroth/herb/pull/2026
Documentation
- Document parser options by @marcoroth in https://github.com/marcoroth/herb/pull/2028
- Document and pin the Erubi behavior
Herb::Enginetargets by @marcoroth in https://github.com/marcoroth/herb/pull/2304 - Using Herb with Git Hooks by @marcoroth in https://github.com/marcoroth/herb/pull/2124
- Add Nova editor integration page by @marcoroth in https://github.com/marcoroth/herb/pull/2119
- Document setup instructions in VS Code README by @marcoroth in https://github.com/marcoroth/herb/pull/2050
- Fix custom rule examples to call
superand extendParserRuleby @marcoroth in https://github.com/marcoroth/herb/pull/2029 - Update the Client docs by @marcoroth in https://github.com/marcoroth/herb/pull/2368
Internal
- Migrate the JavaScript build from
rolluptorolldownby @marcoroth in #2084 and #2298 - Upgrade
tscto TypeScript 7.0, keep 6.0 for the API by @marcoroth in https://github.com/marcoroth/herb/pull/1956 - Upgrade
vitestto5.0.0by @marcoroth in #2301 and #2599 - Stop shipping the unbundled tsc emit and inlined dependencies by @marcoroth in #2073 and #2389
- Fix missing nx build dependencies and remove dead targets by @marcoroth in https://github.com/marcoroth/herb/pull/2116
- Declare workspace dependencies that packages import by @marcoroth in https://github.com/marcoroth/herb/pull/2117
- Include generated templates in the nx build cache key by @marcoroth in https://github.com/marcoroth/herb/pull/2130
- Order every build before the tasks that read its output by @marcoroth in https://github.com/marcoroth/herb/pull/2603
- Add a
typechecktarget that also coverstest/by @marcoroth in https://github.com/marcoroth/herb/pull/2315 - Reuse test workers across files by @marcoroth in https://github.com/marcoroth/herb/pull/2421
- Publish every workspace package to pkg.pr.new by @marcoroth in https://github.com/marcoroth/herb/pull/2474
- Set up nx workspace by @marcoroth in https://github.com/marcoroth/herb/pull/2212
- Declare
outputson every nx build target by @marcoroth in https://github.com/marcoroth/herb/pull/2150 - Set
NODE_DISABLE_COMPILE_CACHEto avoid random V8 crashes by @marcoroth in https://github.com/marcoroth/herb/pull/1977 - Add Yerba Formatting and check by @marcoroth in https://github.com/marcoroth/herb/pull/1995
- Don't try to run Docs and NPM preview on auto-merge by @marcoroth in https://github.com/marcoroth/herb/pull/2145
- Also publish preview for
client,coreanddev-toolsby @marcoroth in https://github.com/marcoroth/herb/pull/2297 - Migrate
cloudflare/pages-actiontocloudflare/wrangler-actionby @marcoroth in https://github.com/marcoroth/herb/pull/2704
libherb
- Fix leaks and double frees across the parse and free cycle by @marcoroth in #2307, #2311, #2312, #2314, #2316 and #2322
- Check parser allocations and leaks under valgrind, including over the corpus by @marcoroth in #2306, #2318 and #2319
- Lazily allocate
hb_array_TforAST_NODE->errorsby @marcoroth in https://github.com/marcoroth/herb/pull/1425 - Use 128 KB pages by default for arenas by @timkaechele in https://github.com/marcoroth/herb/pull/1379
- Fix
bench_allocsinclude path and run it in CI by @marcoroth in https://github.com/marcoroth/herb/pull/2039
Dependencies
Show all
- Bump sorbet from 0.6.13361 to 0.6.13367 by @dependabot in https://github.com/marcoroth/herb/pull/1934
- Bump rollup from 4.62.2 to 4.62.3 by @dependabot in https://github.com/marcoroth/herb/pull/1935
- Bump prettier from 3.9.5 to 3.9.6 by @dependabot in https://github.com/marcoroth/herb/pull/1937
- Bump oxlint from 1.74.0 to 1.76.0 by @dependabot in https://github.com/marcoroth/herb/pull/1938
- Bump @shikijs/vitepress-twoslash from 4.2.0 to 4.3.1 by @dependabot in https://github.com/marcoroth/herb/pull/1936
- Bump vitepress from 2.0.0-alpha.17 to 2.0.0-alpha.18 by @dependabot in https://github.com/marcoroth/herb/pull/1939
- Bump actionview from 8.1.3 to 8.1.3.1 by @dependabot in https://github.com/marcoroth/herb/pull/1942
- Bump concurrently from 10.0.3 to 10.0.4 by @dependabot in https://github.com/marcoroth/herb/pull/1946
- Bump @types/node from 26.1.1 to 26.1.2 by @dependabot in https://github.com/marcoroth/herb/pull/1944
- Bump playwright from 1.61.1 to 1.62.0 by @dependabot in https://github.com/marcoroth/herb/pull/1947
- Bump @vscode/test-electron from 3.0.0 to 3.1.0 by @dependabot in https://github.com/marcoroth/herb/pull/1943
- Bump the
ip-addressandundiciby @dependabot in https://github.com/marcoroth/herb/pull/1985 - Bump
nx,form-data,js-yamlandtmpby @dependabot in https://github.com/marcoroth/herb/pull/2048 - Bump playwright from 1.62.0 to 1.62.1 by @dependabot in https://github.com/marcoroth/herb/pull/2091
- Bump node-addon-api from 8.7.0 to 8.9.1 by @dependabot in https://github.com/marcoroth/herb/pull/2088
- Bump sorbet from 0.6.13367 to 0.6.13405 by @dependabot in https://github.com/marcoroth/herb/pull/2087
- Bump vitepress-plugin-group-icons from 1.7.5 to 1.7.6 by @dependabot in https://github.com/marcoroth/herb/pull/2093
- Bump oxlint from 1.76.0 to 1.77.0 by @dependabot in https://github.com/marcoroth/herb/pull/2092
- Update yerba requirement from 0.8.1 to 0.9.0 by @dependabot in https://github.com/marcoroth/herb/pull/2086
- Bump oxlint from 1.77.0 to 1.78.0 by @dependabot in https://github.com/marcoroth/herb/pull/2248
- Bump rbs from 4.1.2 to 4.1.3 by @dependabot in https://github.com/marcoroth/herb/pull/2243
- Bump rolldown from 1.2.3 to 1.2.4 by @dependabot in https://github.com/marcoroth/herb/pull/2249
- Bump sorbet from 0.6.13405 to 0.6.13425 by @dependabot in https://github.com/marcoroth/herb/pull/2246
- Bump reline from 0.6.3 to 0.7.0 by @dependabot in https://github.com/marcoroth/herb/pull/2244
- Bump postcss-import from 16.1.1 to 16.2.0 by @dependabot in https://github.com/marcoroth/herb/pull/2247
- Bump vscode-languageserver-types from 3.17.5 to 3.18.0 by @dependabot in https://github.com/marcoroth/herb/pull/2245
- Bump esbuild from 0.28.1 to 0.28.2 by @dependabot in https://github.com/marcoroth/herb/pull/2251
- Bump reactionview from 0.3.0 to 0.4.0 by @dependabot in https://github.com/marcoroth/herb/pull/2353
- Bump sorbet from 0.6.13425 to 0.6.13428 by @dependabot in https://github.com/marcoroth/herb/pull/2354
- Bump postcss from 8.5.25 to 8.5.26 by @dependabot in https://github.com/marcoroth/herb/pull/2356
- Bump concurrently from 10.0.4 to 10.0.5 by @dependabot in https://github.com/marcoroth/herb/pull/2358
- Bump postcss-import from 16.2.0 to 17.0.0 by @dependabot in https://github.com/marcoroth/herb/pull/2355
- Bump nx from 22.7.7 to 23.1.1 by @dependabot in https://github.com/marcoroth/herb/pull/2359
- Bump oxlint from 1.78.0 to 1.79.0 by @dependabot in https://github.com/marcoroth/herb/pull/2357
- Bump oxlint from 1.79.0 to 1.80.0 by @dependabot in https://github.com/marcoroth/herb/pull/2463
- Bump node-addon-api from 8.9.1 to 8.9.2 by @dependabot in https://github.com/marcoroth/herb/pull/2459
- Bump rolldown from 1.2.5 to 1.2.6 by @dependabot in https://github.com/marcoroth/herb/pull/2462
- Bump rubydex from v0.3.0 to v0.4.0 by @dependabot in https://github.com/marcoroth/herb/pull/2457
- Bump postcss-selector-parser from 6.1.4 to 7.1.5 by @dependabot in https://github.com/marcoroth/herb/pull/2465
- Bump picomatch from 4.0.5 to 4.0.7 by @dependabot in https://github.com/marcoroth/herb/pull/2464
- Bump sorbet from 0.6.13428 to 0.6.13444 by @dependabot in https://github.com/marcoroth/herb/pull/2461
- Bump vscode-languageserver-textdocument from 1.0.12 to 1.0.14 by @dependabot in https://github.com/marcoroth/herb/pull/2460
- Bump browserslist from 4.25.4 to 4.28.8 by @dependabot in https://github.com/marcoroth/herb/pull/2521
- Bump lightningcss from 0.1.1 to 0.2.0 by @dependabot in https://github.com/marcoroth/herb/pull/2544
- Bump rubydex from v0.4.0 to v0.4.1 by @dependabot in https://github.com/marcoroth/herb/pull/2543
- Bump rolldown from 1.2.6 to 1.2.7 by @dependabot in https://github.com/marcoroth/herb/pull/2548
- Bump zod from 4.4.3 to 4.5.4 by @dependabot in https://github.com/marcoroth/herb/pull/2545
- Bump vscode-languageserver-types from 3.18.0 to 3.18.3 by @dependabot in https://github.com/marcoroth/herb/pull/2549
- Bump nx from 23.1.1 to 23.2.0 by @dependabot in https://github.com/marcoroth/herb/pull/2550
- Bump vscode-languageclient from 10.0.0 to 10.1.1 by @dependabot in https://github.com/marcoroth/herb/pull/2546
- Bump sorbet from 0.6.13444 to 0.6.13466 by @dependabot in https://github.com/marcoroth/herb/pull/2547
- Bump
js-yamlandsvgoby @dependabot in https://github.com/marcoroth/herb/pull/2600 - Update
bindgenrequirement from 0.72 to 0.73 by @dependabot in https://github.com/marcoroth/herb/pull/2621 - Bump
@types/nodefrom 26.1.2 to 26.5.0 by @dependabot in https://github.com/marcoroth/herb/pull/2622 - Bump
@shikijs/vitepress-twoslashfrom 4.3.1 to 4.4.3 by @dependabot in https://github.com/marcoroth/herb/pull/2625 - Bump
vscode-languageserverfrom 10.0.0 to 10.1.1 by @dependabot in https://github.com/marcoroth/herb/pull/2624 - Bump
rolldownfrom 1.2.7 to 1.2.8 by @dependabot in https://github.com/marcoroth/herb/pull/2623 - Bump
vitepressfrom 2.0.0-alpha.18 to 2.0.0-alpha.20 by @dependabot in https://github.com/marcoroth/herb/pull/2626 - Bump rolldown from 1.2.8 to 1.2.9 by @dependabot in https://github.com/marcoroth/herb/pull/2673
- Bump yaml from 2.9.0 to 2.9.1 by @dependabot in https://github.com/marcoroth/herb/pull/2665
- Bump @jothepro/doxygen-awesome-css from v2.4.2 to v2.5.0 by @dependabot in https://github.com/marcoroth/herb/pull/2670
- Bump tsx from 4.23.1 to 4.23.13 by @dependabot in https://github.com/marcoroth/herb/pull/2667
- Bump oxlint from 1.80.0 to 1.83.0 by @dependabot in https://github.com/marcoroth/herb/pull/2672
New Contributors
- @cb341 made their first contribution in https://github.com/marcoroth/herb/pull/677
- @irinanazarova made their first contribution in #1961
- @matiasleidemer made their first contribution in https://github.com/marcoroth/herb/pull/1632
- @G-Rath made their first contribution in #2059
- @alloutflo made their first contribution in #2109
- @brandonweiss made their first contribution in https://github.com/marcoroth/herb/pull/2114
- @joeeei11 made their first contribution in #2022
- @AG0708 made their first contribution in #2193
- @luantaraschi made their first contribution in https://github.com/marcoroth/herb/pull/2197
- @akira-in-tech made their first contribution in #2205
- @jaideeppyne made their first contribution in #2207
- @w3lld1 made their first contribution in #2218
- @manrods made their first contribution in #2253
- @jleo3 made their first contribution in #2214
- @FrancescoK made their first contribution in #2411
- @elizamarcum made their first contribution in https://github.com/marcoroth/herb/pull/2233
- @alexsmolya made their first contribution in #2440
- @davidenglishmusic made their first contribution in https://github.com/marcoroth/herb/pull/2502
- @vjymisal0 made their first contribution in #2148
- @viktorianer made their first contribution in #2637
- @assirims made their first contribution in https://github.com/marcoroth/herb/pull/2553
- @radanskoric made their first contribution in #2695
- @eglitobias made their first contribution in #2659
Commits
Full Changelog: v0.10.4...v0.11.0