Upgrade core-js
to version 3.2.1
This only required changing the import paths. The `es` folder contains all polyfills we need now. If we want to import everything, we need to explicitly require the `index` file.
This commit is contained in:
parent
3da680cdfc
commit
c71a291317
14
package-lock.json
generated
14
package-lock.json
generated
@ -1666,6 +1666,14 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.0",
|
||||||
"regenerator-runtime": "^0.11.0"
|
"regenerator-runtime": "^0.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-types": {
|
"babel-types": {
|
||||||
@ -2521,9 +2529,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "2.6.9",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz",
|
||||||
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==",
|
"integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"core-js-compat": {
|
"core-js-compat": {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"autoprefixer": "^9.6.1",
|
"autoprefixer": "^9.6.1",
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"canvas": "^2.6.0",
|
"canvas": "^2.6.0",
|
||||||
"core-js": "^2.6.9",
|
"core-js": "^3.2.1",
|
||||||
"escodegen": "^1.12.0",
|
"escodegen": "^1.12.0",
|
||||||
"eslint": "^6.4.0",
|
"eslint": "^6.4.0",
|
||||||
"eslint-config-prettier": "^6.3.0",
|
"eslint-config-prettier": "^6.3.0",
|
||||||
|
@ -119,7 +119,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.startsWith) {
|
if (String.prototype.startsWith) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/starts-with');
|
require('core-js/es/string/starts-with');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.prototype.endsWith in legacy browsers.
|
// Provides support for String.prototype.endsWith in legacy browsers.
|
||||||
@ -128,7 +128,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.endsWith) {
|
if (String.prototype.endsWith) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/ends-with');
|
require('core-js/es/string/ends-with');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.prototype.includes in legacy browsers.
|
// Provides support for String.prototype.includes in legacy browsers.
|
||||||
@ -137,7 +137,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.includes) {
|
if (String.prototype.includes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/includes');
|
require('core-js/es/string/includes');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Array.prototype.includes in legacy browsers.
|
// Provides support for Array.prototype.includes in legacy browsers.
|
||||||
@ -146,7 +146,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Array.prototype.includes) {
|
if (Array.prototype.includes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/array/includes');
|
require('core-js/es/array/includes');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Array.from in legacy browsers.
|
// Provides support for Array.from in legacy browsers.
|
||||||
@ -155,7 +155,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Array.from) {
|
if (Array.from) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/array/from');
|
require('core-js/es/array/from');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Object.assign in legacy browsers.
|
// Provides support for Object.assign in legacy browsers.
|
||||||
@ -164,7 +164,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Object.assign) {
|
if (Object.assign) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/object/assign');
|
require('core-js/es/object/assign');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Math.log2 in legacy browsers.
|
// Provides support for Math.log2 in legacy browsers.
|
||||||
@ -173,7 +173,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Math.log2) {
|
if (Math.log2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Math.log2 = require('core-js/fn/math/log2');
|
Math.log2 = require('core-js/es/math/log2');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Number.isNaN in legacy browsers.
|
// Provides support for Number.isNaN in legacy browsers.
|
||||||
@ -182,7 +182,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Number.isNaN) {
|
if (Number.isNaN) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Number.isNaN = require('core-js/fn/number/is-nan');
|
Number.isNaN = require('core-js/es/number/is-nan');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Number.isInteger in legacy browsers.
|
// Provides support for Number.isInteger in legacy browsers.
|
||||||
@ -191,7 +191,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Number.isInteger) {
|
if (Number.isInteger) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Number.isInteger = require('core-js/fn/number/is-integer');
|
Number.isInteger = require('core-js/es/number/is-integer');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Support: IE, Safari<11, Chrome<63
|
// Support: IE, Safari<11, Chrome<63
|
||||||
@ -205,7 +205,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
globalScope.Promise.prototype.finally)) {
|
globalScope.Promise.prototype.finally)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalScope.Promise = require('core-js/fn/promise');
|
globalScope.Promise = require('core-js/es/promise/index');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Support: IE<11, Safari<8, Chrome<36
|
// Support: IE<11, Safari<8, Chrome<36
|
||||||
@ -213,7 +213,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (globalScope.WeakMap) {
|
if (globalScope.WeakMap) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalScope.WeakMap = require('core-js/fn/weak-map');
|
globalScope.WeakMap = require('core-js/es/weak-map/index');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Support: IE11
|
// Support: IE11
|
||||||
@ -221,7 +221,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (globalScope.WeakSet) {
|
if (globalScope.WeakSet) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalScope.WeakSet = require('core-js/fn/weak-set');
|
globalScope.WeakSet = require('core-js/es/weak-set/index');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.codePointAt in legacy browsers.
|
// Provides support for String.codePointAt in legacy browsers.
|
||||||
@ -230,7 +230,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.codePointAt) {
|
if (String.prototype.codePointAt) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/code-point-at');
|
require('core-js/es/string/code-point-at');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.fromCodePoint in legacy browsers.
|
// Provides support for String.fromCodePoint in legacy browsers.
|
||||||
@ -239,7 +239,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.fromCodePoint) {
|
if (String.fromCodePoint) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String.fromCodePoint = require('core-js/fn/string/from-code-point');
|
String.fromCodePoint = require('core-js/es/string/from-code-point');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Support: IE
|
// Support: IE
|
||||||
@ -247,7 +247,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (globalScope.Symbol) {
|
if (globalScope.Symbol) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/es6/symbol');
|
require('core-js/es/symbol/index');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.prototype.padStart in legacy browsers.
|
// Provides support for String.prototype.padStart in legacy browsers.
|
||||||
@ -256,7 +256,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.padStart) {
|
if (String.prototype.padStart) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/pad-start');
|
require('core-js/es/string/pad-start');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for String.prototype.padEnd in legacy browsers.
|
// Provides support for String.prototype.padEnd in legacy browsers.
|
||||||
@ -265,7 +265,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (String.prototype.padEnd) {
|
if (String.prototype.padEnd) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require('core-js/fn/string/pad-end');
|
require('core-js/es/string/pad-end');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Provides support for Object.values in legacy browsers.
|
// Provides support for Object.values in legacy browsers.
|
||||||
@ -274,7 +274,7 @@ const hasDOM = typeof window === 'object' && typeof document === 'object';
|
|||||||
if (Object.values) {
|
if (Object.values) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Object.values = require('core-js/fn/object/values');
|
Object.values = require('core-js/es/object/values');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user