Skip to content

Conversation

@niklasramo
Copy link
Owner

@niklasramo niklasramo commented Dec 20, 2025

4.0.4

No API Changes

The library source code (src/index.ts) is unchanged. This is a maintenance release focused on project structure, tooling, and documentation.


✨ New

  • Sourcemaps now includedindex.js.map and index.cjs.map are now shipped for better debugging

📦 Project Restructuring

  • Tests moved to separate packagetests/ is now a standalone package with its own package.json, reducing root devDependencies
  • Switched bundler from tsup to tsdown — smaller, faster builds
  • Added Prettier config to benchmarks — consistent formatting across all packages

📝 Documentation

  • New "Tips and tricks" recipes:
    • Scheduled callback with deduplication (debounce / coalesce) — using stable IDs with once() for debounce patterns
    • Hot-swap a listener without changing its position — using dedupe: 'update' for stable slots
  • Fixed typos in API examples
  • Updated CDN URL to use major version (@4) instead of pinned patch version
  • Updated bundle size — 561 → 568 bytes (the sourcemap url added a bit of extra weight)

🛠 Tooling & Scripts

  • Added sideEffects: false to package.json for better tree-shaking
  • Added convenience scripts: setup, setup-clean, bump-deps
  • Alphabetized and reorganized npm scripts

⬆️ Dependency Updates

  • @size-limit/preset-small-lib: 11.2.0 → 12.0.0
  • prettier: 3.5.3 → 3.7.4
  • size-limit: 11.2.0 → 12.0.0
  • typescript: 5.8.2 → 5.9.3
  • Replaced tsup with tsdown 0.18.1
  • Removed rimraf (no longer needed)

@socket-security
Copy link

@niklasramo niklasramo merged commit 3fc91e3 into main Dec 20, 2025
3 checks passed
@niklasramo niklasramo deleted the v4.0.4 branch December 20, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants