babel-compat
Advanced tools
Comparing version 0.22.2 to 0.22.3
@@ -25,2 +25,3 @@ /* | ||
'awaitAsyncGenerator', | ||
'checkPrivateRedeclaration', | ||
'AwaitValue', | ||
@@ -36,3 +37,5 @@ 'classApplyDescriptorDestructureSet', | ||
'classPrivateFieldDestructureSet', | ||
'classPrivateFieldInitSpec', | ||
'classPrivateMethodGet', | ||
'classPrivateMethodInitSpec', | ||
'classPrivateMethodSet', | ||
@@ -39,0 +42,0 @@ 'classStaticPrivateFieldDestructureSet', |
@@ -81,7 +81,5 @@ import AwaitValue from "./AwaitValue"; | ||
if (typeof Symbol === "function" && Symbol.asyncIterator) { | ||
AsyncGenerator.prototype[Symbol.asyncIterator] = function () { | ||
return this; | ||
}; | ||
} | ||
AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () { | ||
return this; | ||
}; | ||
@@ -88,0 +86,0 @@ AsyncGenerator.prototype.next = function (arg) { |
@@ -18,7 +18,5 @@ export default function _asyncGeneratorDelegate(inner, awaitWrap) { | ||
if (typeof Symbol === "function" && Symbol.iterator) { | ||
iter[Symbol.iterator] = function () { | ||
return this; | ||
}; | ||
} | ||
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () { | ||
return this; | ||
}; | ||
@@ -25,0 +23,0 @@ iter.next = function (value) { |
@@ -5,14 +5,10 @@ export default function _asyncIterator(iterable) { | ||
if (typeof Symbol !== "undefined") { | ||
if (Symbol.asyncIterator) { | ||
method = iterable[Symbol.asyncIterator]; | ||
if (method != null) return method.call(iterable); | ||
} | ||
if (Symbol.iterator) { | ||
method = iterable[Symbol.iterator]; | ||
if (method != null) return method.call(iterable); | ||
} | ||
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator]; | ||
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator]; | ||
} | ||
throw new TypeError("Object is not async iterable"); | ||
if (method == null) method = iterable["@@asyncIterator"]; | ||
if (method == null) method = iterable["@@iterator"]; | ||
if (method == null) throw new TypeError("Object is not async iterable"); | ||
return method.call(iterable); | ||
} |
import unsupportedIterableToArray from "./unsupportedIterableToArray"; | ||
export default function _createForOfIteratorHelper(o, allowArrayLike) { | ||
var it; | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (!it) { | ||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
@@ -38,3 +38,3 @@ if (it) o = it; | ||
s: function () { | ||
it = o[Symbol.iterator](); | ||
it = it.call(o); | ||
}, | ||
@@ -41,0 +41,0 @@ n: function () { |
import unsupportedIterableToArray from "./unsupportedIterableToArray"; | ||
export default function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it; | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) return (it = it.call(o)).next.bind(it); | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) o = it; | ||
var i = 0; | ||
return function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) o = it; | ||
var i = 0; | ||
return function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
}; | ||
} | ||
it = o[Symbol.iterator](); | ||
return it.next.bind(it); | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} |
export default function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} |
export default function _iterableToArrayLimit(arr, i) { | ||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; | ||
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | ||
if (_i == null) return; | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
var _s, _e; | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
@@ -11,0 +14,0 @@ |
export default function _iterableToArrayLimitLoose(arr, i) { | ||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (_i == null) return; | ||
var _arr = []; | ||
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { | ||
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { | ||
_arr.push(_step.value); | ||
@@ -7,0 +9,0 @@ |
@@ -41,3 +41,3 @@ var REACT_ELEMENT_TYPE; | ||
type: type, | ||
key: key === undefined ? null : '' + key, | ||
key: key === undefined ? null : "" + key, | ||
ref: null, | ||
@@ -44,0 +44,0 @@ props: props, |
@@ -8,3 +8,3 @@ import defineProperty from "./defineProperty"; | ||
if (typeof Object.getOwnPropertySymbols === 'function') { | ||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { | ||
ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||
@@ -11,0 +11,0 @@ })); |
@@ -8,5 +8,9 @@ import defineProperty from "./defineProperty"; | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
@@ -13,0 +17,0 @@ } |
@@ -5,2 +5,4 @@ import assertThisInitialized from "./assertThisInitialized"; | ||
return call; | ||
} else if (call !== void 0) { | ||
throw new TypeError("Derived constructors may only return object or undefined"); | ||
} | ||
@@ -7,0 +9,0 @@ |
@@ -1,6 +0,4 @@ | ||
import wrapNativeSuper from "./wrapNativeSuper"; | ||
import getPrototypeOf from "./getPrototypeOf"; | ||
import possibleConstructorReturn from "./possibleConstructorReturn"; | ||
import setPrototypeOf from "./setPrototypeOf"; | ||
import inherits from "./inherits"; | ||
export default function _wrapRegExp(re, groups) { | ||
export default function _wrapRegExp() { | ||
_wrapRegExp = function (re, groups) { | ||
@@ -10,4 +8,2 @@ return new BabelRegExp(re, undefined, groups); | ||
var _RegExp = wrapNativeSuper(RegExp); | ||
var _super = RegExp.prototype; | ||
@@ -18,10 +14,10 @@ | ||
function BabelRegExp(re, flags, groups) { | ||
var _this = _RegExp.call(this, re, flags); | ||
var _this = new RegExp(re, flags); | ||
_groups.set(_this, groups || _groups.get(re)); | ||
return _this; | ||
return setPrototypeOf(_this, BabelRegExp.prototype); | ||
} | ||
inherits(BabelRegExp, _RegExp); | ||
inherits(BabelRegExp, RegExp); | ||
@@ -46,6 +42,6 @@ BabelRegExp.prototype.exec = function (str) { | ||
return _super[Symbol.replace].call(this, str, function () { | ||
var args = []; | ||
args.push.apply(args, arguments); | ||
var args = arguments; | ||
if (typeof args[args.length - 1] !== "object") { | ||
args = [].slice.call(args); | ||
args.push(buildGroups(args, _this)); | ||
@@ -52,0 +48,0 @@ } |
{ | ||
"name": "babel-compat", | ||
"version": "0.22.2", | ||
"version": "0.22.3", | ||
"main": "build/index.js", | ||
@@ -12,9 +12,9 @@ "description": "Babel helpers customized for COMPAT", | ||
"dependencies": { | ||
"@babel/core": "7.13.10", | ||
"@babel/generator": "7.13.9", | ||
"@babel/helpers": "7.13.10", | ||
"@babel/types": "7.13.0", | ||
"@babel/core": "7.15.5", | ||
"@babel/generator": "7.15.4", | ||
"@babel/helpers": "7.15.4", | ||
"@babel/types": "7.15.4", | ||
"regenerator-runtime": "^0.12.0" | ||
}, | ||
"gitHead": "ced7c7020256e67d79eff7b4e09084e557d9e3c0" | ||
"gitHead": "53bfe6b15e1f38e4f3e5317e92a93470800a333c" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
70431
91
1929
1
+ Added@babel/core@7.15.5(transitive)
+ Added@babel/generator@7.15.4(transitive)
+ Added@babel/helpers@7.15.4(transitive)
+ Added@babel/types@7.15.4(transitive)
- Removed@babel/core@7.13.10(transitive)
- Removed@babel/generator@7.13.9(transitive)
- Removed@babel/helpers@7.13.10(transitive)
- Removed@babel/types@7.13.0(transitive)
- Removedlodash@4.17.21(transitive)
Updated@babel/core@7.15.5
Updated@babel/generator@7.15.4
Updated@babel/helpers@7.15.4
Updated@babel/types@7.15.4