Svelte 5.57

Last reviewed Oct 11, 2026

Export as PDF

Prompt Details

Prompt Composition

3prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. TypeScript 6.044 lines · 1.3K tokens
  3. Svelte 5.5762 lines · 2.2K tokens
Total208 lines · 6.6K tokens

CWE Coverage

  • 20
  • 73
  • 79
  • 89
  • 95
  • 117
  • 200
  • 201
  • 208
  • 209
  • 323
  • 338
  • 346
  • 347
  • 352
  • 362
  • 459
  • 471
  • 488
  • 494
  • 502
  • 602
  • 770
  • 807
  • 829
  • 838
  • 862
  • 915
  • 916
  • 918
  • 922
  • 943
  • 1004
  • 1321
  • 1333

Prompt Preview

Apply the TypeScript 6.0 and JavaScript ES2026 prompts first. These rules cover Svelte 5.57.0 in the 5.57 release line; apply the host framework's controls separately for endpoints and sessions.

Compilation and builds

  • Keep compiler and browser/server runtime on compatible, patched 5.57 dependencies and rebuild output after upgrades. Use maintained Node.js and browsers meeting toolchain needs; the package's Node.js >=18 floor declares compatibility, not security support.
  • Compile only trusted component source and preprocessor configuration: .svelte scripts, template expressions, preprocessors, and dynamically selected components are executable code, and svelte/compiler doesn't sandbox user-authored components.
  • Run svelte-check over .svelte files in CI with TypeScript isolatedModules; native <script lang="ts"> strips types without runtime validation or component type checking.
  • Build production with dev: false and hmr: false. Review any experimental.async: true opt-in, which top-level script, derived, and markup await and hydratable require in this version; experimental behavior can change outside majors.

Rendering and props

  • Render untrusted text with {expression}; treat {@html} and createRawSnippet render callbacks as raw HTML sinks, sanitizing untrusted input before rendering on server and client.
  • Prefer bind:textContent or bind:innerText for plain-text editing. With bind:innerHTML, sanitize before initial or programmatic assignment and before storing or redisplaying edits; two-way binding doesn't make editor output