Skip to content

Commit c18ccf9

Browse files
jurijzahn8019autofix-ci[bot]IWANABETHATGUYclaude
authored
Allow undefined in sourcesContent type (#9136)
Updated sourcesContent type to allow undefined values. This makes it compatible to BindingSourceMap Fixes: #9135 --------- Signed-off-by: Jurij Zahn <44019949+jurijzahn8019@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: IWANABETHATGUY <iwanabethatguy@qq.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f4e60c9 commit c18ccf9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/rolldown/src/types/sourcemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface ExistingRawSourceMap {
77
mappings: string;
88
names?: string[];
99
sources?: (string | null)[];
10-
sourcesContent?: (string | null)[];
10+
sourcesContent?: (string | null | undefined)[];
1111
sourceRoot?: string;
1212
version?: number; // make it optional to compat { mappings: '' }
1313
x_google_ignoreList?: number[];

packages/rolldown/src/utils/transform-sourcemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap';
22

3-
export function isEmptySourcemapFiled(array: undefined | (string | null)[]): boolean {
3+
export function isEmptySourcemapFiled(array: undefined | (string | null | undefined)[]): boolean {
44
if (!array) {
55
return true;
66
}

0 commit comments

Comments
 (0)