File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,10 @@ following attributes:
240
240
241
241
- ` file ` : Optional. The generated filename this source map is associated with.
242
242
243
+ - ` x_google_ignoreList ` : Optional. An additional extension field which is an array
244
+ of indices refering to urls in the sources array. This is used to identify third-party
245
+ sources, that the developer might want to avoid when debugging.
246
+
243
247
The promise of the constructed souce map consumer is returned.
244
248
245
249
When the ` SourceMapConsumer ` will no longer be used anymore, you must call its
Original file line number Diff line number Diff line change @@ -187,7 +187,11 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
187
187
const sourcesContent = util . getArg ( sourceMap , "sourcesContent" , null ) ;
188
188
const mappings = util . getArg ( sourceMap , "mappings" ) ;
189
189
const file = util . getArg ( sourceMap , "file" , null ) ;
190
- const x_google_ignoreList = util . getArg ( sourceMap , "x_google_ignoreList" , null ) ;
190
+ const x_google_ignoreList = util . getArg (
191
+ sourceMap ,
192
+ "x_google_ignoreList" ,
193
+ null
194
+ ) ;
191
195
192
196
// Once again, Sass deviates from the spec and supplies the version as a
193
197
// string rather than a number, so we use loose equality checking here.
Original file line number Diff line number Diff line change @@ -88,15 +88,16 @@ exports["test that the `sources` field has the original sources"] =
88
88
map . destroy ( ) ;
89
89
} ;
90
90
91
- exports [ "test that the SourceMapConsumer supports the ignoreList" ] = async function ( assert ) {
91
+ exports [ "test that the SourceMapConsumer supports the ignoreList" ] =
92
+ async function ( assert ) {
92
93
const map = await new SourceMapConsumer ( util . testMapWithIgnoreList ) ;
93
94
const sources = map . sources ;
94
95
const ignoreList = map . x_google_ignoreList ;
96
+ assert . equal ( ignoreList . length , 1 ) ;
95
97
assert . equal ( ignoreList [ 0 ] , 0 ) ;
96
98
assert . equal ( sources [ ignoreList [ 0 ] ] , "/the/root/one.js" ) ;
97
- assert . equal ( ignoreList . length , 1 ) ;
98
99
map . destroy ( ) ;
99
- }
100
+ } ;
100
101
101
102
exports [ "test that the source root is reflected in a mapping's source field" ] =
102
103
async function ( assert ) {
You can’t perform that action at this time.
0 commit comments