Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update polyfills to use core-js. #1142

Merged
merged 1 commit into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"yargs": "^1.3.1"
},
"dependencies": {
"array-includes": "^3.0.2",
"array.prototype.find": "^2.0.3"
"core-js": "^2.4.1"
}
}
12 changes: 2 additions & 10 deletions src/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
Misc polyfills
*/
/*jshint -W121 */
import shimArrayFind from 'array.prototype.find/shim';
import shimArrayIncludes from 'array-includes/shim';

if (!Array.prototype.find) {
shimArrayFind();
}

if (!Array.prototype.includes) {
shimArrayIncludes();
}
require('core-js/fn/array/find');
require('core-js/fn/array/includes');

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
Number.isInteger = Number.isInteger || function(value) {
Expand Down
14 changes: 5 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ babel-polyfill@^6.13.0:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-preset-es2015@^6.5.0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you revert these changes? I don't think they relate to the polyfill

babel-preset-es2015@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
dependencies:
Expand Down Expand Up @@ -1857,7 +1857,7 @@ d@1:
dependencies:
es5-ext "^0.10.9"

"dargs@github:christian-bromann/dargs":
dargs@christian-bromann/dargs:
version "4.0.1"
resolved "https://codeload.github.com/christian-bromann/dargs/tar.gz/7d6d4164a7c4106dbd14ef39ed8d95b7b5e9b770"
dependencies:
Expand Down Expand Up @@ -2353,11 +2353,11 @@ escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"

escape-string-regexp@1.0.2, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2:
escape-string-regexp@1.0.2, escape-string-regexp@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"

escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5:
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

Expand Down Expand Up @@ -4853,11 +4853,7 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"

lru-cache@2:
version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"

lru-cache@2.2.x:
lru-cache@2, lru-cache@2.2.x:
version "2.2.4"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"

Expand Down