magic-string is a small, fast utility for manipulating source code as strings, making light edits like replacing characters, prepending, appending, moving, and overwriting. It also generates version 3 source maps (optionally including original content), which can help when transforming code while preserving mapping back to the original.
Project status
- The repository shows active maintenance, with the upstream push on 2026-07-23 and recent
updatestagged for 2026-07-23 (v1.1.0) and 2026-07-16 (v1.0.0). - Apparent update cadence is fairly fast recently, about 1 week between v1.0.0 and v1.1.0 (2026-07-16 to 2026-07-23).
AI summary generated
Recent updates
v1.1.0
v1.1.0 focuses on a bug fix in trimming behavior for overwrite operations where the replacement text is longer than the target range, and a performance-oriented internal change. It also updates internal chunk tracking to use Map instead of plain object indexing.
v1.0.0
v1.0.0 migrates magic-string to a pure ESM build and switches its type declarations to be generated from the TypeScript source. The release also includes a bug fix for a crash involving zero-length ranges, plus a performance optimization for indent behavior.
Breakingv0.30.21
Release v0.30.21 appears to be a metadata-only update. The diff shows a version bump in package.json, a repository URL format tweak, and an added changelog header entry, with no library code changes.
v0.30.20
This release (v0.30.20) contains no significant changes per the provided release notes. There are no documented updates affecting APIs, behavior, security, performance, or migration steps.
v0.30.19
Release v0.30.19 was published on 2025-09-08, but the publisher provided no release notes or change log details. As a result, there is no documented information about new features, bug fixes, breaking changes, security, or dependency updates in this release.