From 06bbfa13306a144ae8f2d5114bc2c893ca05bb83 Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 10:12:39 +0530 Subject: [PATCH 1/5] fix: forward sourceMapUrl in BasicSourceMapConsumer.fromSourceMap --- lib/source-map-consumer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/source-map-consumer.js b/lib/source-map-consumer.js index 17ef92b1..f5f96460 100644 --- a/lib/source-map-consumer.js +++ b/lib/source-map-consumer.js @@ -283,7 +283,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer { * @returns BasicSourceMapConsumer */ static fromSourceMap(aSourceMap, aSourceMapURL) { - return new BasicSourceMapConsumer(aSourceMap.toString()); + return new BasicSourceMapConsumer(aSourceMap.toString(), aSourceMapURL); } get sources() { From cda85d1ff6b332a7ffe36e65cd916b0cb5e67489 Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 15:33:38 +0530 Subject: [PATCH 2/5] fix(types): SourceNode.children should be (SourceNode | string)[] --- source-map.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-map.d.ts b/source-map.d.ts index 45646052..119962f6 100644 --- a/source-map.d.ts +++ b/source-map.d.ts @@ -381,7 +381,7 @@ export class SourceMapGenerator { } export class SourceNode { - children: SourceNode[]; + children: (SourceNode | string)[]; sourceContents: any; line: number; column: number; From 1d10e92681f85ae435507c586b1833225238cf1e Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 16:24:40 +0530 Subject: [PATCH 3/5] feat(consumer): support renamed ignoreList field in source maps --- lib/source-map-consumer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/source-map-consumer.js b/lib/source-map-consumer.js index f5f96460..f33248a5 100644 --- a/lib/source-map-consumer.js +++ b/lib/source-map-consumer.js @@ -192,6 +192,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer { "x_google_ignoreList", null ); + // Support the renamed `ignoreList` field (spec rename of x_google_ignoreList). + const ignoreList = util.getArg(sourceMap, "ignoreList", null); // Once again, Sass deviates from the spec and supplies the version as a // string rather than a number, so we use loose equality checking here. @@ -220,7 +222,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer { that._mappings = mappings; that._sourceMapURL = aSourceMapURL; that.file = file; - that.x_google_ignoreList = x_google_ignoreList; + that.x_google_ignoreList = x_google_ignoreList || ignoreList; + that.ignoreList = that.x_google_ignoreList; that._computedColumnSpans = false; that._wasmMappings = null; From 2cca7b20fa558c995a8d39c04e2ee9584c10619b Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 16:47:49 +0530 Subject: [PATCH 4/5] feat(generator): support ignoreList/x_google_ignoreList in SourceMapGenerator --- lib/source-map-generator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/source-map-generator.js b/lib/source-map-generator.js index 847017fa..adc97a6d 100644 --- a/lib/source-map-generator.js +++ b/lib/source-map-generator.js @@ -417,6 +417,9 @@ class SourceMapGenerator { if (this._sourceRoot != null) { map.sourceRoot = this._sourceRoot; } + if (this._ignoreList) { + map.ignoreList = this._ignoreList; + } if (this._sourcesContents) { map.sourcesContent = this._generateSourcesContent( map.sources, From 68bcf8dc5f1a1fe1a98e41d919a1219c00c15e63 Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 16:48:32 +0530 Subject: [PATCH 5/5] feat(generator): support ignoreList in constructor --- lib/source-map-generator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/source-map-generator.js b/lib/source-map-generator.js index adc97a6d..e705ddc1 100644 --- a/lib/source-map-generator.js +++ b/lib/source-map-generator.js @@ -30,6 +30,8 @@ class SourceMapGenerator { this._names = new ArraySet(); this._mappings = new MappingList(); this._sourcesContents = null; + this._ignoreList = util.getArg(aArgs, "ignoreList", null) || + util.getArg(aArgs, "x_google_ignoreList", null); } /**