Repository navigation
Releases: OskarKarpinski/css-shuffle
Releases · OskarKarpinski/css-shuffle
Release list
v1.3.0
What's New in v1.3.0
🚀 Features & Ecosystem Support
- Official Vite Plugin (
css-shuffle/vite): First-class Vite plugin supporting single-page apps (React, Vue, Svelte, vanilla) and frameworks building on Vite. - Astro SSR Support: Full support for Astro Server-Side Rendering (
output: 'server'), obfuscating server component templates and inline styles with zero runtime mismatches. - Safelist Configuration: Added
safelist: (string | RegExp)[]option to preserve specific classes, IDs, or patterns from obfuscation. - Flexible Mapping Configuration: Support for
mappingFileoption (string | false) to configure output paths or disablemapping.jsonemission.
📚 Documentation & Examples
- Complete Runnable Examples: Added standalone templates in
examples/:examples/astro-static: Astro SSGexamples/astro-ssr: Astro SSR with Node standalone adapterexamples/vite: Vanilla Vite applicationexamples/node-cli: Direct Node.js programmatic API usage
- Streamlined README: Concise, modern documentation with clear quick-start guides and before/after comparisons.
📦 Maintenance & Packaging
- Clean npm Distribution: Whitelisted
files: ["dist"], reducing package tarball size by ~42% (from 34.5 kB to 19.9 kB) and eliminating dev/test file leakage. - Modern Dependencies: Upgraded to Babel 8, TypeScript 7, Vitest 5, PostCSS 8.5+, Vite 8, and Astro 7.
- Export Aliases: Added
cssShufflePluginandcssShuffleexport aliases for optimal Vite developer experience.
Full Changelog: v1.2.1...v1.3.0
v1.2.1
Fixed
application/ld+jsonscripts are now ignored by the obfuscator. (fixed crash)
Changed
- Replaced
globbywith Node.js’ nativeglobsupport, reducing dependencies and simplifying file discovery.
Full Changelog: v1.2.0...v1.2.1
v1.2.0
Added
- Name protection — Scan HTML for protected names (e.g.
id="projects"referenced ashref="/#projects") to avoid breaking same-page anchor links - JavaScript file support — Process
.js,.mjs, and.cjsfiles to obfuscate class/ID references in DOM API calls - ARIA ID-reference obfuscation — Automatically rename IDs in
aria-labelledby,aria-describedby,aria-controls,aria-owns,aria-activedescendant,aria-details,aria-errormessage, andaria-flowtoattributes, including space-separated ID lists
Changed
- Consolidated HTML processing — Replaced three separate HTML passes (inline CSS, name replacement, script obfuscation) with a single read/write operation on one
cheerioDOM instance, improving performance and reliability - CSS selector parsing — Replaced fragile regex-based selector obfuscation with
postcss-selector-parserfor proper handling of edge cases like:not(#id),:has(.class), unicode names, and escaped characters
Fixed
- HTML/JS-only identifiers — Classes and IDs that only appeared in HTML or JavaScript files (not in CSS) are now correctly obfuscated
- Element selector obfuscation — Fixed obfuscation for element-based selectors
- Hash fragment protection — Extended name protection to handle hash fragments in any
href(e.g./projects#test), not just fragment-only links
Internal
- Project architecture refactored for better maintainability
- Debug logger and code documentation improvements
v1.1.1
Fixes
Fixed support for some properties
New Features
Added debug logger by setting the CSS_SHUFFLE=debug env variable.
v1.1.0
New Feature
Added support for using obfuscated CSS classes in JavaScript code for DOM functions
Full Changelog: v1.0.1...v1.1.0