metro-minify-terser
Advanced tools
Comparing version 0.59.0 to 0.60.0
{ | ||
"name": "metro-minify-terser", | ||
"version": "0.59.0", | ||
"version": "0.60.0", | ||
"description": "🚇 Alternative minifier for Metro", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -7,3 +7,3 @@ /** | ||
* | ||
* strict-local | ||
* | ||
* @format | ||
@@ -10,0 +10,0 @@ */ |
@@ -7,3 +7,3 @@ /** | ||
* | ||
* strict-local | ||
* | ||
* @format | ||
@@ -13,16 +13,33 @@ */ | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function(sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var ownKeys = Object.keys(source); | ||
if (typeof Object.getOwnPropertySymbols === "function") { | ||
ownKeys = ownKeys.concat( | ||
Object.getOwnPropertySymbols(source).filter(function(sym) { | ||
return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||
}) | ||
); | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function(key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function(key) { | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
); | ||
}); | ||
} | ||
ownKeys.forEach(function(key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} | ||
@@ -60,5 +77,9 @@ return target; | ||
code: result.code, | ||
map: _objectSpread({}, map, { | ||
sources: [options.filename] | ||
}) | ||
map: _objectSpread( | ||
_objectSpread({}, map), | ||
{}, | ||
{ | ||
sources: [options.filename] | ||
} | ||
) | ||
}; | ||
@@ -73,12 +94,24 @@ } | ||
const options = _objectSpread({}, config, { | ||
mangle: _objectSpread({}, config.mangle, { | ||
reserved | ||
}), | ||
sourceMap: map | ||
? _objectSpread({}, config.sourceMap, { | ||
content: map | ||
}) | ||
: false | ||
}); | ||
const options = _objectSpread( | ||
_objectSpread({}, config), | ||
{}, | ||
{ | ||
mangle: _objectSpread( | ||
_objectSpread({}, config.mangle), | ||
{}, | ||
{ | ||
reserved | ||
} | ||
), | ||
sourceMap: map | ||
? _objectSpread( | ||
_objectSpread({}, config.sourceMap), | ||
{}, | ||
{ | ||
content: map | ||
} | ||
) | ||
: false | ||
} | ||
); | ||
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an | ||
@@ -96,3 +129,2 @@ * error found when Flow v0.111 was deployed. To see the error, delete this | ||
code: result.code, | ||
// eslint-disable-next-line lint/flow-no-fixme | ||
map: result.map | ||
@@ -99,0 +131,0 @@ }; |
Sorry, the diff of this file is not supported yet
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
5303
128