core-js 3.16.1 → 3.16.2

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,4 +1,4 @@
1
1
  var userAgent = require('../internals/engine-user-agent');
2
2
  var global = require('../internals/global');
3
3
 
4
- module.exports = /iphone|ipod|ipad/i.test(userAgent) && global.Pebble !== undefined;
4
+ module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;
@@ -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 = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
@@ -34,17 +34,15 @@ var NullProtoObjectViaIFrame = function () {
34
34
  var iframe = documentCreateElement('iframe');
35
35
  var JS = 'java' + SCRIPT + ':';
36
36
  var iframeDocument;
37
- if (iframe.style) {
38
- iframe.style.display = 'none';
39
- html.appendChild(iframe);
40
- // https://github.com/zloirock/core-js/issues/475
41
- iframe.src = String(JS);
42
- iframeDocument = iframe.contentWindow.document;
43
- iframeDocument.open();
44
- iframeDocument.write(scriptTag('document.F=Object'));
45
- iframeDocument.close();
46
- return iframeDocument.F;
47
- }
37
+ iframe.style.display = 'none';
38
+ html.appendChild(iframe);
39
+ // https://github.com/zloirock/core-js/issues/475
40
+ iframe.src = String(JS);
41
+ iframeDocument = iframe.contentWindow.document;
42
+ iframeDocument.open();
43
+ iframeDocument.write(scriptTag('document.F=Object'));
44
+ iframeDocument.close();
45
+ return iframeDocument.F;
48
46
  };
49
47
 
50
48
  // Check for document.domain and active x support
@@ -57,10 +55,11 @@ var NullProtoObject = function () {
57
55
  try {
58
56
  activeXDocument = new ActiveXObject('htmlfile');
59
57
  } catch (error) { /* ignore */ }
60
- NullProtoObject = document.domain && activeXDocument ?
61
- NullProtoObjectViaActiveX(activeXDocument) : // old IE
62
- NullProtoObjectViaIFrame() ||
63
- NullProtoObjectViaActiveX(activeXDocument); // WSH
58
+ NullProtoObject = typeof document != 'undefined'
59
+ ? document.domain && activeXDocument
60
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
61
+ : NullProtoObjectViaIFrame()
62
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
64
63
  var length = enumBugKeys.length;
65
64
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
66
65
  return NullProtoObject();
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- /* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
3
3
  /* eslint-disable regexp/no-useless-quantifier -- testing */
4
4
  var toString = require('../internals/to-string');
5
5
  var regexpFlags = require('../internals/regexp-flags');
@@ -1,19 +1,18 @@
1
1
  var fails = require('../internals/fails');
2
+ var global = require('../internals/global');
2
3
 
3
- // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
4
- var RE = function (s, f) {
5
- return RegExp(s, f);
6
- };
4
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
5
+ var $RegExp = global.RegExp;
7
6
 
8
7
  exports.UNSUPPORTED_Y = fails(function () {
9
- var re = RE('a', 'y');
8
+ var re = $RegExp('a', 'y');
10
9
  re.lastIndex = 2;
11
10
  return re.exec('abcd') != null;
12
11
  });
13
12
 
14
13
  exports.BROKEN_CARET = fails(function () {
15
14
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
16
- var re = RE('^r', 'gy');
15
+ var re = $RegExp('^r', 'gy');
17
16
  re.lastIndex = 2;
18
17
  return re.exec('str') != null;
19
18
  });
@@ -1,7 +1,10 @@
1
1
  var fails = require('./fails');
2
+ var global = require('../internals/global');
3
+
4
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
5
+ var $RegExp = global.RegExp;
2
6
 
3
7
  module.exports = fails(function () {
4
- // babel-minify transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
5
- var re = RegExp('.', (typeof '').charAt(0));
8
+ var re = $RegExp('.', 's');
6
9
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
7
10
  });
@@ -1,8 +1,11 @@
1
1
  var fails = require('./fails');
2
+ var global = require('../internals/global');
3
+
4
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
5
+ var $RegExp = global.RegExp;
2
6
 
3
7
  module.exports = fails(function () {
4
- // babel-minify transpiles RegExp('.', 'g') -> /./g and it causes SyntaxError
5
- var re = RegExp('(?<a>b)', (typeof '').charAt(5));
8
+ var re = $RegExp('(?<a>b)', 'g');
6
9
  return re.exec('b').groups.a !== 'b' ||
7
10
  'b'.replace(re, '$<a>c') !== 'bc';
8
11
  });
@@ -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.16.1',
7
+ version: '3.16.2',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -41,6 +41,7 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
41
41
  result.groups = { a: '7' };
42
42
  return result;
43
43
  };
44
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
44
45
  return ''.replace(re, '$<a>') !== '7';
45
46
  });
46
47
 
@@ -37,7 +37,7 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
37
37
  'test'.split(/(?:)/, -1).length != 4 ||
38
38
  'ab'.split(/(?:ab)*/).length != 2 ||
39
39
  '.'.split(/(.?)(.?)/).length != 4 ||
40
- // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
40
+ // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
41
41
  '.'.split(/()()/).length > 1 ||
42
42
  ''.split(/.?/).length
43
43
  ) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "3.16.1",
4
+ "version": "3.16.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"
@@ -54,5 +54,5 @@
54
54
  "scripts": {
55
55
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
56
56
  },
57
- "gitHead": "d4ecfcefcb07bda80fad210142efdfdce5f66acd"
57
+ "gitHead": "ef826cce45d2896ee92a2a27f6f09c2397e0a8b3"
58
58
  }