Avatar for the MrWaip user
MrWaip
svelte-rs-2
BlogDocsChangelog

Performance History

Latest Results

Implement CSS scoping with hash-based class injection (#168) * feat(css): implement CSS scoped class injection pipeline (slice 1) - Parse CSS in svelte_parser via lightningcss (parse_css_block) - Add CssAnalysis type with hash, scoped_elements, css_output fields - Implement djb2-backward hash algorithm matching Svelte 5 output - CSS analysis pass: scope selectors (p → p.svelte-hash), mark elements - Inject scoped class into HTML template (element_html in html.rs) - Wire analyze_css_pass into compile() and thread css through CompileResult - Add CSS comparison to test infrastructure: case-svelte.css / case-rust.css - css_scoped_basic now passes: <p class="svelte-1a7i8ec">styled</p> https://claude.ai/code/session_01XdPUSja4JHrJkLLFSk5AuW * feat(playground): show CSS output in diff view alongside JS - WasmCompileResult now includes css: Option<String> - Playground joins JS + CSS with a /* ---- CSS ---- */ separator - Both Svelte JS and Rust WASM outputs use the same joinJsCss() helper - CSS differences are visible directly in the existing diff editor https://claude.ai/code/session_01XdPUSja4JHrJkLLFSk5AuW * feat(playground): normalize CSS whitespace via format_css before diff - Add WasmCompiler.format_css() backed by lightningcss printer - joinJsCss() runs CSS through format_css so both sides use 2-space indent — diff shows only semantic differences, not whitespace noise https://claude.ai/code/session_01XdPUSja4JHrJkLLFSk5AuW --------- Co-authored-by: Claude <noreply@anthropic.com>
master
5 hours ago
Add attribute_duplicate, attribute_quoted, slot_attribute_invalid, and textarea_invalid_content diagnostics (#166) * Port 4 attribute diagnostics: duplicate, quoted, slot_invalid, textarea_invalid_content - attribute_duplicate: detect repeated attr names in attr_convert.rs; HTMLAttribute and BindDirective share the "attr" key space; `this` excluded (matches reference) - attribute_quoted: warn on quoted single-expression attrs on components and custom elements in runes mode; adds visit_component_node to TemplateValidationVisitor - slot_attribute_invalid: fire when slot= value is not StringAttribute and parent is a ComponentNode (extends existing placement check) - textarea_invalid_content: fire when <textarea> has both a value attr and children; uses AttrIndex (O(1)) in the pre-computation block All 4 have unit tests. Full suite: 446 passed, 0 failed. attribute_unquoted_sequence deferred — scanner limitation (unquoted concat not parsed). https://claude.ai/code/session_01H4oix4JCBnqTMR2zYY1HgG * Extract track_duplicate helper to remove repetition in attr_convert.rs The same if/else duplicate-detection block was copied across 4 match arms. Extracted to a free function `track_duplicate` with an `exclude_this` flag that encodes the HTMLAttribute/BindDirective "attr" key-space exclusion of `this`. https://claude.ai/code/session_01H4oix4JCBnqTMR2zYY1HgG * Fix 3 analysis bugs exposed by stricter codegen gate, restructure pipeline - analyzer always runs (even with parse errors); codegen is skipped when any error diagnostic is present — parse errors now surface alongside analyze errors - fix false-positive props_duplicate: $props() + $props.id() are allowed together; only duplicate calls of the SAME rune are errors (matches reference compiler) - fix false-positive bind_invalid_value: plain let/var variables are always valid bind targets (the bind directive's setter writes to them); error should only fire for non-writable rune targets like $derived - update/add tests to match corrected behaviour https://claude.ai/code/session_01H4oix4JCBnqTMR2zYY1HgG * Remove dead bind_target_updated_elsewhere, add pipeline contract test bind_target_updated_elsewhere was a partial proxy for the reference compiler's binding.updated flag, but was never reached after the plain mutable let/var condition was added. Remove it and the dead import it would have needed. Add analyze_runs_despite_parse_errors test to document and guard the pipeline contract: analyze always runs even when the parser reports errors, so both layers surface diagnostics in a single compile call. https://claude.ai/code/session_01H4oix4JCBnqTMR2zYY1HgG --------- Co-authored-by: Claude <noreply@anthropic.com>
master
5 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Implement CSS scoping with hash-based class injection#168
5 hours ago
9d1be1b
claude/port-css-l3XiI
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
6 hours ago
7787c5b
claude/fix-svelte-syntax-B9j8F
© 2026 CodSpeed Technology
Home Terms Privacy Docs