Skip to content

Releases: OskarKarpinski/css-shuffle

v1.3.0

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 28 Sep 16:46
9f1dc00

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 mappingFile option (string | false) to configure output paths or disable mapping.json emission.

📚 Documentation & Examples

  • Complete Runnable Examples: Added standalone templates in examples/:
    • examples/astro-static: Astro SSG
    • examples/astro-ssr: Astro SSR with Node standalone adapter
    • examples/vite: Vanilla Vite application
    • examples/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 cssShufflePlugin and cssShuffle export aliases for optimal Vite developer experience.

Full Changelog: v1.2.1...v1.3.0

v1.2.1

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 18 Jul 22:26
v1.2.1
1ce9fc3

Fixed

  • application/ld+json scripts are now ignored by the obfuscator. (fixed crash)

Changed

  • Replaced globby with Node.js’ native glob support, reducing dependencies and simplifying file discovery.

Full Changelog: v1.2.0...v1.2.1

v1.2.0

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 03 May 15:16

Added

  • Name protection — Scan HTML for protected names (e.g. id="projects" referenced as href="/#projects") to avoid breaking same-page anchor links
  • JavaScript file support — Process .js, .mjs, and .cjs files 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, and aria-flowto attributes, 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 cheerio DOM instance, improving performance and reliability
  • CSS selector parsing — Replaced fragile regex-based selector obfuscation with postcss-selector-parser for 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

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 10 Apr 20:21

Fixes

Fixed support for some properties

New Features

Added debug logger by setting the CSS_SHUFFLE=debug env variable.

v1.1.0

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 08 Apr 15:04

New Feature

Added support for using obfuscated CSS classes in JavaScript code for DOM functions

Full Changelog: v1.0.1...v1.1.0

v1.0.1

Choose a tag to compare

@OskarKarpinski OskarKarpinski released this 27 Aug 09:33
becf987
Release v1.0.1