github carbon-design-system/carbon-preprocess-svelte v0.11.54

latest releases: v0.14.4, v0.14.3, v0.14.2...
one month ago

Fixes

  • specializer: pass snippets and children to library components
  • specializer: keep props a parent can set via bind:this or a custom element
  • specializer: read namespace members; walk other packages' components
  • specializer: read runes from their bindings, not their names

Performance

  • specializer: read the library's sources in parallel (~8 ms → ~4.6 ms for Carbon)
  • upgrade sveast to 0.9.5 (~20% faster analyzeScopes; ~22.5 MB vs ~27.5 MB retained models)

The shared analysis behind optimizeCss({ propAware: true }) and optimizeComponents mishandled a few Svelte shapes. Pruned CSS and rewritten JS sizes on the golden apps are the same as v0.11.53; this release is correctness and cold-analysis cost.

optimizeCss({ propAware: true }) / optimizeComponents()

  • Snippets and default slot content reach library components as props (children, named {#snippet}), so runes branches like {#if children} stay when the app fills them.
  • A component held with bind:this (or used as a custom element) keeps every prop value a parent could set outside the markup call site.
  • import * as L from "…" then <L.Button> is a real call site; other-package children inside the library are walked instead of turning the analysis off.
  • $state / $props are taken from scope bindings, so a store named state no longer shadows the rune.

Cold analysis

v0.11.53 v0.11.54
Read Carbon’s sources (544 files) ~8 ms ~4.6 ms
analyzeScopes (sveast 0.9.5) — ~20% faster
Retained size of large-app component models ~27.5 MB ~22.5 MB

Don't miss a new carbon-preprocess-svelte release

NewReleases is sending notifications on new releases.