babel-core
Advanced tools
Comparing version 6.26.2 to 6.26.3
@@ -37,7 +37,2 @@ "use strict"; | ||
if (output.sources.length !== 1) { | ||
throw new Error("Assertion failure - expected a single output file"); | ||
} | ||
var defaultSource = output.sources[0]; | ||
var mergedGenerator = new _sourceMap2.default.SourceMapGenerator(); | ||
@@ -64,59 +59,62 @@ for (var _iterator = input.sources, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { | ||
var insertedMappings = new _map2.default(); | ||
if (output.sources.length === 1) { | ||
var defaultSource = output.sources[0]; | ||
var insertedMappings = new _map2.default(); | ||
eachInputGeneratedRange(input, function (generated, original, source) { | ||
eachOverlappingGeneratedOutputRange(defaultSource, generated, function (item) { | ||
var key = makeMappingKey(item); | ||
if (insertedMappings.has(key)) return; | ||
insertedMappings.set(key, item); | ||
eachInputGeneratedRange(input, function (generated, original, source) { | ||
eachOverlappingGeneratedOutputRange(defaultSource, generated, function (item) { | ||
var key = makeMappingKey(item); | ||
if (insertedMappings.has(key)) return; | ||
insertedMappings.set(key, item); | ||
mergedGenerator.addMapping({ | ||
source: source.path, | ||
original: { | ||
line: original.line, | ||
column: original.columnStart | ||
}, | ||
generated: { | ||
line: item.line, | ||
column: item.columnStart | ||
}, | ||
name: original.name | ||
mergedGenerator.addMapping({ | ||
source: source.path, | ||
original: { | ||
line: original.line, | ||
column: original.columnStart | ||
}, | ||
generated: { | ||
line: item.line, | ||
column: item.columnStart | ||
}, | ||
name: original.name | ||
}); | ||
}); | ||
}); | ||
}); | ||
for (var _iterator2 = insertedMappings.values(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { | ||
var _ref3; | ||
for (var _iterator2 = insertedMappings.values(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) { | ||
var _ref3; | ||
if (_isArray2) { | ||
if (_i2 >= _iterator2.length) break; | ||
_ref3 = _iterator2[_i2++]; | ||
} else { | ||
_i2 = _iterator2.next(); | ||
if (_i2.done) break; | ||
_ref3 = _i2.value; | ||
} | ||
if (_isArray2) { | ||
if (_i2 >= _iterator2.length) break; | ||
_ref3 = _iterator2[_i2++]; | ||
} else { | ||
_i2 = _iterator2.next(); | ||
if (_i2.done) break; | ||
_ref3 = _i2.value; | ||
} | ||
var item = _ref3; | ||
var item = _ref3; | ||
if (item.columnEnd === Infinity) { | ||
continue; | ||
} | ||
if (item.columnEnd === Infinity) { | ||
continue; | ||
} | ||
var clearItem = { | ||
line: item.line, | ||
columnStart: item.columnEnd | ||
}; | ||
var clearItem = { | ||
line: item.line, | ||
columnStart: item.columnEnd | ||
}; | ||
var key = makeMappingKey(clearItem); | ||
if (insertedMappings.has(key)) { | ||
continue; | ||
var key = makeMappingKey(clearItem); | ||
if (insertedMappings.has(key)) { | ||
continue; | ||
} | ||
mergedGenerator.addMapping({ | ||
generated: { | ||
line: clearItem.line, | ||
column: clearItem.columnStart | ||
} | ||
}); | ||
} | ||
mergedGenerator.addMapping({ | ||
generated: { | ||
line: clearItem.line, | ||
column: clearItem.columnStart | ||
} | ||
}); | ||
} | ||
@@ -123,0 +121,0 @@ |
{ | ||
"name": "babel-core", | ||
"version": "6.26.2", | ||
"version": "6.26.3", | ||
"description": "Babel compiler core.", | ||
@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106709
2687