@tsrx/preact@0.1.29
Ripple-TS/ripple@tsrx/preact@0.1.29Jun 12, 2026by github-actions[bot]
AI Summary
This release implements the style scope hash improvements to ensure unique and secure hashing for scoped styles.
Key Highlights
- Improved style scope hash uniqueness to prevent collisions
- Switched hashing algorithm from djb2 to truncated SHA-256
- Added requirement for `filename` parameter in parsing functions
Breaking Changes
- The `filename` parameter of `parse`, `parseModule`, and per-target `parse` wrappers is now required (typed as a non-empty string).
New Features
- Enhanced style scoping with unique hashes per file and block
- Implementation of truncated SHA-256 hashing
Full Release Notes
### Patch Changes - [#1260](https://github.com/Ripple-TS/ripple/pull/1260) [`b1256fd`](https://github.com/Ripple-TS/ripple/commit/b1256fdb5bf279ee7dd20bf1a71dcfccc47e279c) Thanks [@leonidaz](https://github.com/leonidaz)! - Make style scope hashes unique per style block and per file. The hash was derived from the style block's content alone, so two `<style>` blocks with identical CSS — in different components of the same file, or in different files — collided and shared a scope. The hash input now includes the filename and the line/column where the `<style>` tag starts. Because the filename may be an absolute path, the hash also switched from the reversible djb2 hash to the truncated SHA-256 hash so file structure can't be recovered from class names in the shipped bundle. The `filename` parameter of `parse`, `parseModule`, and the per-target `parse` wrappers is now required (typed as a non-empty string), and parsing a `<style>` element without one throws a clear error instead of silently seeding the hash with an empty name. The prettier plugin and eslint parser pass their host's file path through, falling back to a plugin-specific placeholder when formatting or linting in-memory text. - Updated dependencies [[`67de047`](https://github.com/Ripple-TS/ripple/commit/67de047d103f39673b25910e1a97760278820999), [`1c645c8`](https://github.com/Ripple-TS/ripple/commit/1c645c8f854df23bb1271b3402d1885616b525cd), [`b1256fd`](https://github.com/Ripple-TS/ripple/commit/b1256fdb5bf279ee7dd20bf1a71dcfccc47e279c)]: - @tsrx/core@0.1.29