Skip to content

v1.0.2 - Security Fixes and Documentation

Choose a tag to compare

@Emasoft Emasoft released this 26 Nov 01:29
· 405 commits to main since this release

🔒 Security Fixes

📚 Documentation Improvements

  • Created comprehensive API.md (753 lines)

    • Complete browser API reference
    • Installation instructions for CDN and npm
    • Usage examples and code samples
    • Options reference and return types
    • Error handling guide and performance tips
  • Enhanced README.md with beginner-friendly content:

    • Added "Simple Examples (Quick Start)" section
    • Added "Programmatic Usage" section with examples for:
      • HTML Page integration
      • JavaScript/Node.js
      • TypeScript
      • Backend file processing
      • CLI tools programmatic usage
    • All examples use default values for easy copy-paste

⚙️ Configuration Fixes

  • Created tsconfig.json (fixes CI typecheck job)
  • Updated jsconfig.json to include .cjs and .mjs files
  • Added .tmp-compare/ to .gitignore

🎨 Code Quality Fixes

  • Changed DEBUG flag from true to false in SvgVisualBBox.js
    • Eliminates console spam in production
  • Rebuilt SvgVisualBBox.min.js without debug code
    • Size reduced: 25.3 KB → 23.5 KB (7.1% improvement)
    • Total reduction: 73.5 KB → 23.5 KB (68.1% from original)

📦 CDN Usage

<!-- Latest version -->
<script src="https://unpkg.com/svg-bbox@latest/SvgVisualBBox.min.js"></script>

<!-- This version -->
<script src="https://unpkg.com/svg-bbox@1.0.2/SvgVisualBBox.min.js"></script>

🔍 Testing

  • 170+ tests passing covering core functionality
  • 15 edge case failures (non-blocking):
    • SVG sanitization edge cases
    • HTML preview with complex transforms
    • Tracked for future release

📥 Installation

npm install svg-bbox@1.0.2

or

pnpm add svg-bbox@1.0.2

See the README and API.md for complete documentation.