From d27d699633351242444c8773c213f48869969463 Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 03:59:57 +0530 Subject: [PATCH 1/2] 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 752fe212d952c29fdde6e3ffd220a8f5b797a582 Mon Sep 17 00:00:00 2001 From: def-Param Date: Fri, 30 Oct 2026 04:12:59 +0530 Subject: [PATCH 2/2] feat: support renamed ignoreList field in source maps --- README.md | 2 +- lib/source-map-consumer.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3e78caf0..aeb9260c 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ following attributes: - `file`: Optional. The generated filename this source map is associated with. -- `x_google_ignoreList`: Optional. An additional extension field which is an array +- `ignoreList` (or `x_google_ignoreList`): Optional. An additional extension field which is an array of indices refering to urls in the sources array. This is used to identify third-party sources, that the developer might want to avoid when debugging. [Read more](https://developer.chrome.com/articles/x-google-ignore-list/) diff --git a/lib/source-map-consumer.js b/lib/source-map-consumer.js index f5f96460..4bf6944b 100644 --- a/lib/source-map-consumer.js +++ b/lib/source-map-consumer.js @@ -187,10 +187,10 @@ class BasicSourceMapConsumer extends SourceMapConsumer { const sourcesContent = util.getArg(sourceMap, "sourcesContent", null); const mappings = util.getArg(sourceMap, "mappings"); const file = util.getArg(sourceMap, "file", null); - const x_google_ignoreList = util.getArg( + const ignoreList = util.getArg( sourceMap, - "x_google_ignoreList", - null + "ignoreList", + util.getArg(sourceMap, "x_google_ignoreList", null) ); // Once again, Sass deviates from the spec and supplies the version as a @@ -220,7 +220,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer { that._mappings = mappings; that._sourceMapURL = aSourceMapURL; that.file = file; - that.x_google_ignoreList = x_google_ignoreList; + that.ignoreList = ignoreList; + that.x_google_ignoreList = ignoreList; that._computedColumnSpans = false; that._wasmMappings = null;