[change] update Animated

Fix #309
This commit is contained in:
Nicolas Gallagher
2017-01-01 18:35:18 -08:00
parent d87f71ebc1
commit b1cd92a65d
6 changed files with 13 additions and 34 deletions
-5
View File
@@ -24,11 +24,6 @@ module.exports = {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
'process.env.__REACT_NATIVE_DEBUG_ENABLED__': DEV
}),
// https://github.com/animatedjs/animated/issues/40
new webpack.NormalModuleReplacementPlugin(
/es6-set/,
path.join(__dirname, '../../src/modules/polyfills/Set.js')
),
new webpack.optimize.OccurenceOrderPlugin()
],
resolve: {
+1 -1
View File
@@ -22,7 +22,7 @@
"test:watch": "npm run test:jest -- --watch"
},
"dependencies": {
"animated": "^0.1.3",
"animated": "^0.1.5",
"array-find-index": "^1.0.2",
"asap": "^2.0.5",
"babel-runtime": "^6.11.6",
+3 -5
View File
@@ -4,7 +4,6 @@
*/
import asap from 'asap';
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';
const hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -27,7 +26,7 @@ const getStyleText = () => {
// TODO: SSR support
const getAvailableClassNames = () => {
if (ExecutionEnvironment.canUseDOM) {
if (global.document) {
if (!styleNode) {
styleNode = document.getElementById(STYLE_ELEMENT_ID);
}
@@ -45,8 +44,7 @@ const getAvailableClassNames = () => {
const createStyleHTML = (text) => `<style id="${STYLE_ELEMENT_ID}">${text}</style>`;
const frame = () => {
if (!isDirty || !ExecutionEnvironment.canUseDOM) { return; }
if (!isDirty || !global.document) { return; }
isDirty = false;
styleNode = styleNode || document.getElementById(STYLE_ELEMENT_ID);
@@ -74,7 +72,7 @@ const addRule = (key, rule) => {
registry[key] = rule;
if (!isDirty) {
isDirty = true;
if (ExecutionEnvironment.canUseDOM) {
if (global.document) {
asap(frame);
}
}
-8
View File
@@ -1,8 +0,0 @@
function SetPolyfill() { this._cache = []; }
SetPolyfill.prototype.add = function (e) {
if (this._cache.indexOf(e) === -1) { this._cache.push(e); }
};
SetPolyfill.prototype.forEach = function (cb) {
this._cache.forEach(cb);
};
module.exports = SetPolyfill;
-5
View File
@@ -31,11 +31,6 @@ module.exports = {
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
new webpack.optimize.DedupePlugin(),
// https://github.com/animatedjs/animated/issues/40
new webpack.NormalModuleReplacementPlugin(
/es6-set/,
path.join(__dirname, 'dist/modules/polyfills/Set.js')
),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
+9 -10
View File
@@ -181,13 +181,12 @@ amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
animated@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/animated/-/animated-0.1.4.tgz#1e7d119ea0027e1279b96ec309f5cb54935a915a"
animated@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/animated/-/animated-0.1.5.tgz#83df8dc443d57abab7b0bb04818b0b655b31c9b9"
dependencies:
es6-set "^0.1.4"
invariant "^2.2.0"
tinycolor "0.0.1"
normalize-css-color "^1.0.1"
ansi-escapes@^1.1.0, ansi-escapes@^1.4.0:
version "1.4.0"
@@ -2045,7 +2044,7 @@ es6-map@^0.1.3:
es6-symbol "~3.1.0"
event-emitter "~0.3.4"
es6-set@^0.1.4, es6-set@~0.1.3:
es6-set@~0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8"
dependencies:
@@ -4017,6 +4016,10 @@ nopt@3.x, nopt@~3.0.6:
dependencies:
abbrev "1"
normalize-css-color@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/normalize-css-color/-/normalize-css-color-1.0.1.tgz#792f59cae25036950a9127cfcfddc073048f4f9d"
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.3.5"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df"
@@ -5452,10 +5455,6 @@ timers-browserify@^1.0.1:
dependencies:
process "~0.11.0"
tinycolor@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/tinycolor/-/tinycolor-0.0.1.tgz#320b5a52d83abb5978d81a3e887d4aefb15a6164"
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"