Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-core

Package Overview
Dependencies
Maintainers
6
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-core - npm Package Compare versions

Comparing version 6.26.2 to 6.26.3

100

lib/transformation/file/merge-map.js

@@ -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>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc