unstale

npm / juice

juice

What changed in juice 11 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

7 breaking1 security9 new APIs and options2 behavior and defaults1 tooling9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

juice 1224 changes

Breaking changes 7

  • Non-string HTML input now produces a clear TypeError.

    12.2.0release notes

  • Browserify can no longer bundle juice/client because client.js is ESM; use a modern bundler instead.

    12.0.0release notes

  • Juice is now ESM-only. Node 22.12+ can still load it through require(esm); older Node versions must upgrade or use an ESM import.

    12.0.0release notes

  • TypeScript declarations are now named index.d.ts and restructured for ESM default-export resolution.

    12.0.0release notes

  • The minimum supported Node version is now 22.12.0; Node 18 and Node 20 are no longer supported.

    12.0.0release notes

  • CSS preserved inside <style> blocks is now canonically formatted, so output may differ from previous formatting.

    12.0.0release notes

  • Specificity for :is(), :where(), :has(), and :not() now follows CSS Selectors Level 4; cascade resolution may change for styles relying on the previous behavior.

    12.0.0release notes

Security 1

  • Prevents ReDoS in CSS variable parsing, reducing the risk of denial-of-service when processing CSS.

    12.1.2release notes

New APIs and options 7

  • Adds an option to add !important to pseudo-classes.

    12.2.0release notes

  • FreeMarker templates are supported in codeBlocks by default.

    12.2.0release notes

  • The CLI supports reading from stdin and writing to stdout.

    12.2.0release notes

  • Adds the data-juice-important attribute.

    12.1.0release notes

  • TypeScript types are exposed through the types condition in exports and resolve under nodenext module resolution.

    12.0.0release notes

  • Adds an option to preserve @container at-rules through inlining; it defaults to true.

    12.0.0release notes

  • Adds an option to preserve @layer at-rules through inlining; it defaults to true.

    12.0.0release notes

Tooling 1

Fixes and other changes 8

  • CSS counters are resolved in document order with proper scoping.

    12.2.0release notes

  • Element lists are typed as tag name strings.

    12.2.0release notes

  • Pseudo-element rules that cannot be inlined are preserved.

    12.2.0release notes

  • Style attributes that contain invalid CSS are kept instead of causing an error.

    12.2.0release notes

  • Template tags between declarations in style attributes are preserved.

    12.2.0release notes

  • Handles &lt; and CDATA in style tags when xmlMode is enabled.

    12.2.0release notes

  • Level 1 nested rules, nested at-rules, parent selectors, and bare nested selectors are flattened before inlining instead of being silently dropped.

    12.0.0release notes

  • Long-standing crashes and hangs involving :not(a, b, …) are fixed.

    12.0.0release notes

juice 115 changes

New APIs and options 2

Behavior and default changes 2

Fixes and other changes 1