magic-string breaking changes
magic-string 1.4.2 (September 23, 2026) is its newest release with breaking changes, 2 of them. The first: Removed MagicString.indentExclusionRanges. Every breaking API change we have recorded in magic-string on npm: 31 breaking changes in 9 versions. Below, its 9 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 1.4.5. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
- From 0.30.0 to 1.4.2: 26 breaking changes in 6 versions.
- From 0.26.0 to 1.4.2: 29 breaking changes in 8 versions.
magic-string 1.4.2 breaking changes
- Removed
MagicString.indentExclusionRanges
MagicString.indentExclusionRanges was removed in magic-string 1.4.2 npmjs.com - Signature changed
MagicString.original
Was original: string; now readonly original: string. npmjs.com
magic-string 1.4.0 breaking changes
- Signature changed
MagicString.move
Was move(start: number, end: number, index: number): this; now move(start: number, end: number, index: number, affinity?: "left" | "right"): this. npmjs.com - Signature changed
SourceMap.constructor
Was constructor(properties: DecodedSourceMap); now constructor(properties: DecodedSourceMap | (Omit<DecodedSourceMap, "mappings"> & {mappings: string;})). npmjs.com
magic-string 1.3.1 breaking changes
- Signature changed
Bundle.generateDecodedMap
Was generateDecodedMap(options?: SourceMapOptions): DecodedSourceMapOrMissingContent; now generateDecodedMap(options?: BundleSourceMapOptions): DecodedSourceMapOrMissingContent. npmjs.com - Signature changed
Bundle.generateMap
Was generateMap(options?: SourceMapOptions): Omit<SourceMap, "sourcesContent"> & {sourcesContent: Array<string | null>;}; now generateMap(options?: BundleSourceMapOptions): Omit<SourceMap, "sourcesContent"> & {sourcesContent: Array<string... npmjs.com - Signature changed
SourceMapOptions.hires
Was hires?: boolean | "boundary"; now hires?: boolean | "boundary" | "experimental-range". npmjs.com
magic-string 1.2.3 breaking changes
- Behavior changed
Negative indices smaller than -length now clamp to the start instead of wrapping around repeatedly. Code that relied on the wrapping output should check its indices. github.com
magic-string 1.2.1 breaking changes
- Behavior changed
An overlapping move now throws an error where it previously corrupted the chunk list silently. Code that performs overlapping moves may now fail at runtime. github.com - Behavior changed
Bundle.isEmpty
Bundle#isEmpty now counts separators, so a bundle holding only separators is no longer reported as empty. Check code that relies on the previous result. github.com
magic-string 1.0.0 breaking changes
- Configuration changed
The package ships only ESM now and the CJS, UMD and IIFE builds are gone, so code that loads it with require or as a global script must switch to ESM imports. github.com - Signature changed
Bundle.addSource
Was addSource(source: MagicString | {filename?: string; content: MagicString; ignoreList?: boolean}): this; now addSource(source: MagicString | BundleSourceDescription): this. npmjs.com - Signature changed
Bundle.generateDecodedMap
Was generateDecodedMap(options?: SourceMapOptions): Omit<DecodedSourceMap, 'sourcesContent'> & {sourcesContent: Array<string | null>}; now generateDecodedMap(options?: SourceMapOptions): DecodedSourceMapOrMissingContent. npmjs.com - Signature changed
Bundle.indentExclusionRanges
Was indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; now indentExclusionRanges: ExclusionRange | ExclusionRange[] | undefined. npmjs.com - Signature changed
DecodedSourceMap.file
Was file: string; now file?: string. npmjs.com - Signature changed
DecodedSourceMap.sourcesContent
Was sourcesContent?: string[]; now sourcesContent?: Array<string | null>. npmjs.com - Signature changed
default.constructor
Was constructor(str: string, options?: MagicStringOptions); now constructor(string: string, options?: MagicStringOptions). npmjs.com - Signature changed
default.indentExclusionRanges
Was indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; now indentExclusionRanges: MagicStringOptions["indentExclusionRanges"]. npmjs.com - Signature changed
default.replace
Was replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this; now replace(searchValue: string | RegExp, replacement: string | ReplacementFunction): this. npmjs.com - Signature changed
default.replaceAll
Was replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this; now replaceAll(searchValue: string | RegExp, replacement: string | ReplacementFunction): this. npmjs.com
And 6 more in this version. Sign up to see every change
Older versions
3 older versions.
Show 3 older versions
magic-string 0.30.0 breaking changes
- Signature changed
Bundle.addSource
Was addSource(source: MagicString | {filename?: string, content: MagicString}): Bundle; now addSource(source: MagicString | {filename?: string, content: MagicString, ignoreList?: boolean}): Bundle. npmjs.com
magic-string 0.28.0 breaking changes
- Signature changed
DecodedSourceMap.sourcesContent
Was sourcesContent: string[]; now sourcesContent: (string | null)[]. npmjs.com - Signature changed
SourceMap.sourcesContent
Was sourcesContent: string[]; now sourcesContent: (string | null)[]. npmjs.com
magic-string 0.26.0 breaking changes
- Removed
Node.js v10 is no longer supported. Users on Node.js v10 must upgrade their runtime before using this version. github.com - Behavior changed
The ESM build output is now written with a .mjs extension instead of .js. Code that imports the old ESM file paths must update them. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.