core-js 3.10.0 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  var userAgent = require('../internals/engine-user-agent');
2
2
 
3
- module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
3
+ module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
@@ -4,7 +4,6 @@ require('../modules/es.regexp.exec');
4
4
  var redefine = require('../internals/redefine');
5
5
  var fails = require('../internals/fails');
6
6
  var wellKnownSymbol = require('../internals/well-known-symbol');
7
- var regexpExec = require('../internals/regexp-exec');
8
7
  var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
9
8
 
10
9
  var SPECIES = wellKnownSymbol('species');
@@ -95,7 +94,7 @@ module.exports = function (KEY, length, exec, sham) {
95
94
  ) {
96
95
  var nativeRegExpMethod = /./[SYMBOL];
97
96
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
98
- if (regexp.exec === regexpExec) {
97
+ if (regexp.exec === RegExp.prototype.exec) {
99
98
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
100
99
  // The native String method already delegates to @@method (this
101
100
  // polyfilled function), leasing to infinite recursion.
@@ -4,9 +4,6 @@ var stickyHelpers = require('./regexp-sticky-helpers');
4
4
  var shared = require('./shared');
5
5
 
6
6
  var nativeExec = RegExp.prototype.exec;
7
- // This always refers to the native implementation, because the
8
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
9
- // which loads this file before patching the method.
10
7
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
11
8
 
12
9
  var patchedExec = nativeExec;
@@ -4,7 +4,7 @@ var store = require('../internals/shared-store');
4
4
  (module.exports = function (key, value) {
5
5
  return store[key] || (store[key] = value !== undefined ? value : {});
6
6
  })('versions', []).push({
7
- version: '3.10.0',
7
+ version: '3.10.1',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -2,4 +2,4 @@
2
2
  var userAgent = require('../internals/engine-user-agent');
3
3
 
4
4
  // eslint-disable-next-line unicorn/no-unsafe-regex -- safe
5
- module.exports = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
5
+ module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
@@ -8,15 +8,13 @@ var advanceStringIndex = require('../internals/advance-string-index');
8
8
  var toLength = require('../internals/to-length');
9
9
  var callRegExpExec = require('../internals/regexp-exec-abstract');
10
10
  var regexpExec = require('../internals/regexp-exec');
11
- var fails = require('../internals/fails');
11
+ var stickyHelpers = require('../internals/regexp-sticky-helpers');
12
12
 
13
+ var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
13
14
  var arrayPush = [].push;
14
15
  var min = Math.min;
15
16
  var MAX_UINT32 = 0xFFFFFFFF;
16
17
 
17
- // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
18
- var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
19
-
20
18
  // @@split logic
21
19
  fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
22
20
  var internalSplit;
@@ -99,11 +97,11 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
99
97
  var flags = (rx.ignoreCase ? 'i' : '') +
100
98
  (rx.multiline ? 'm' : '') +
101
99
  (rx.unicode ? 'u' : '') +
102
- (SUPPORTS_Y ? 'y' : 'g');
100
+ (UNSUPPORTED_Y ? 'g' : 'y');
103
101
 
104
102
  // ^(? + rx + ) is needed, in combination with some S slicing, to
105
103
  // simulate the 'y' flag.
106
- var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
104
+ var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
107
105
  var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
108
106
  if (lim === 0) return [];
109
107
  if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
@@ -111,12 +109,12 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
111
109
  var q = 0;
112
110
  var A = [];
113
111
  while (q < S.length) {
114
- splitter.lastIndex = SUPPORTS_Y ? q : 0;
115
- var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
112
+ splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
113
+ var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);
116
114
  var e;
117
115
  if (
118
116
  z === null ||
119
- (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
117
+ (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
120
118
  ) {
121
119
  q = advanceStringIndex(S, q, unicodeMatching);
122
120
  } else {
@@ -133,4 +131,4 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
133
131
  return A;
134
132
  }
135
133
  ];
136
- }, !SUPPORTS_Y);
134
+ }, UNSUPPORTED_Y);
@@ -40,7 +40,8 @@ var subscriptionClosed = function (subscriptionState) {
40
40
  return subscriptionState.observer === undefined;
41
41
  };
42
42
 
43
- var close = function (subscription, subscriptionState) {
43
+ var close = function (subscriptionState) {
44
+ var subscription = subscriptionState.facade;
44
45
  if (!DESCRIPTORS) {
45
46
  subscription.closed = true;
46
47
  var subscriptionObserver = subscriptionState.subscriptionObserver;
@@ -79,7 +80,7 @@ Subscription.prototype = redefineAll({}, {
79
80
  unsubscribe: function unsubscribe() {
80
81
  var subscriptionState = getInternalState(this);
81
82
  if (!subscriptionClosed(subscriptionState)) {
82
- close(this, subscriptionState);
83
+ close(subscriptionState);
83
84
  cleanupSubscription(subscriptionState);
84
85
  }
85
86
  }
@@ -111,11 +112,10 @@ SubscriptionObserver.prototype = redefineAll({}, {
111
112
  }
112
113
  },
113
114
  error: function error(value) {
114
- var subscription = getInternalState(this).subscription;
115
- var subscriptionState = getInternalState(subscription);
115
+ var subscriptionState = getInternalState(getInternalState(this).subscription);
116
116
  if (!subscriptionClosed(subscriptionState)) {
117
117
  var observer = subscriptionState.observer;
118
- close(subscription, subscriptionState);
118
+ close(subscriptionState);
119
119
  try {
120
120
  var errorMethod = getMethod(observer.error);
121
121
  if (errorMethod) errorMethod.call(observer, value);
@@ -126,11 +126,10 @@ SubscriptionObserver.prototype = redefineAll({}, {
126
126
  }
127
127
  },
128
128
  complete: function complete() {
129
- var subscription = getInternalState(this).subscription;
130
- var subscriptionState = getInternalState(subscription);
129
+ var subscriptionState = getInternalState(getInternalState(this).subscription);
131
130
  if (!subscriptionClosed(subscriptionState)) {
132
131
  var observer = subscriptionState.observer;
133
- close(subscription, subscriptionState);
132
+ close(subscriptionState);
134
133
  try {
135
134
  var completeMethod = getMethod(observer.complete);
136
135
  if (completeMethod) completeMethod.call(observer);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "3.10.0",
4
+ "version": "3.10.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git",
@@ -55,5 +55,5 @@
55
55
  "scripts": {
56
56
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
57
57
  },
58
- "gitHead": "bb9b7f58458914e54cb4dbc130374a4c0487fca5"
58
+ "gitHead": "dfa44ca9098d22d057f3a516940a0f5e35617830"
59
59
  }