From 98e5e2b4275871b86c1e2c30a3400a331d6b422f Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Thu, 11 Feb 2016 02:20:59 -0800 Subject: [PATCH] Remove knowledge of fbjs from the packager Summary: As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm. This PR does several things: 1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`. 2. Removes the modules that were previously being used in lieu of their `fbjs` eq Closes https://github.com/facebook/react-native/pull/5084 Reviewed By: bestander Differential Revision: D2803288 Pulled By: davidaurelio fb-gh-sync-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2 shipit-source-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2 --- .flowconfig | 4 - .../__tests__/InteractionManager-test.js | 1 + Libraries/Promise.js | 36 +- Libraries/vendor/core/Map.js | 626 ------------------ Libraries/vendor/core/isEmpty.js | 34 - Libraries/vendor/crypto/crc32.js | 92 --- Libraries/vendor/fbjs/CSSCore.js | 14 + Libraries/vendor/fbjs/Deferred.js | 14 + Libraries/vendor/fbjs/EventListener.js | 14 + Libraries/vendor/fbjs/Map.js | 14 + Libraries/vendor/fbjs/PromiseMap.js | 14 + Libraries/vendor/fbjs/TouchEventUtils.js | 14 + Libraries/vendor/fbjs/URI.js | 14 + Libraries/vendor/fbjs/UserAgent.js | 14 + Libraries/vendor/fbjs/UserAgentData.js | 14 + Libraries/vendor/fbjs/VersionRange.js | 14 + Libraries/vendor/fbjs/areEqual.js | 14 + Libraries/vendor/fbjs/base62.js | 14 + Libraries/vendor/fbjs/camelize.js | 14 + Libraries/vendor/fbjs/camelizeStyleName.js | 14 + Libraries/vendor/fbjs/containsNode.js | 14 + Libraries/vendor/fbjs/crc32.js | 14 + Libraries/vendor/fbjs/createArrayFromMixed.js | 14 + .../vendor/fbjs/createNodesFromMarkup.js | 14 + Libraries/vendor/fbjs/emptyFunction.js | 14 + Libraries/vendor/fbjs/emptyObject.js | 14 + Libraries/vendor/fbjs/everyObject.js | 14 + Libraries/vendor/fbjs/fetchWithRetries.js | 14 + Libraries/vendor/fbjs/filterObject.js | 14 + Libraries/vendor/fbjs/flattenArray.js | 14 + Libraries/vendor/fbjs/focusNode.js | 14 + Libraries/vendor/fbjs/forEachObject.js | 14 + Libraries/vendor/fbjs/getActiveElement.js | 14 + Libraries/vendor/fbjs/getMarkupWrap.js | 14 + .../vendor/fbjs/getUnboundedScrollPosition.js | 14 + Libraries/vendor/fbjs/hyphenate.js | 14 + Libraries/vendor/fbjs/hyphenateStyleName.js | 14 + Libraries/vendor/fbjs/invariant.js | 14 + Libraries/vendor/fbjs/isEmpty.js | 14 + Libraries/vendor/fbjs/isNode.js | 14 + Libraries/vendor/fbjs/isTextNode.js | 14 + Libraries/vendor/fbjs/joinClasses.js | 14 + Libraries/vendor/fbjs/keyMirror.js | 14 + Libraries/vendor/fbjs/keyOf.js | 14 + Libraries/vendor/fbjs/mapObject.js | 14 + Libraries/vendor/fbjs/memoizeStringOnly.js | 14 + Libraries/vendor/fbjs/monitorCodeUse.js | 14 + .../fbjs/nativeRequestAnimationFrame.js | 14 + Libraries/vendor/fbjs/nullthrows.js | 14 + Libraries/vendor/fbjs/performance.js | 14 + Libraries/vendor/fbjs/performanceNow.js | 14 + Libraries/vendor/fbjs/removeFromArray.js | 14 + .../vendor/fbjs/requestAnimationFrame.js | 14 + Libraries/vendor/fbjs/resolveImmediate.js | 14 + Libraries/vendor/fbjs/shallowEqual.js | 14 + Libraries/vendor/fbjs/someObject.js | 14 + Libraries/vendor/fbjs/sprintf.js | 14 + Libraries/vendor/fbjs/warning.js | 14 + .../vendor/fbjs/xhrSimpleDataSerializer.js | 14 + npm-shrinkwrap.json | 169 ++--- package.json | 5 +- packager/blacklist.js | 30 - packager/react-packager/src/Resolver/index.js | 1 - 63 files changed, 848 insertions(+), 892 deletions(-) delete mode 100644 Libraries/vendor/core/Map.js delete mode 100644 Libraries/vendor/core/isEmpty.js delete mode 100644 Libraries/vendor/crypto/crc32.js create mode 100644 Libraries/vendor/fbjs/CSSCore.js create mode 100644 Libraries/vendor/fbjs/Deferred.js create mode 100644 Libraries/vendor/fbjs/EventListener.js create mode 100644 Libraries/vendor/fbjs/Map.js create mode 100644 Libraries/vendor/fbjs/PromiseMap.js create mode 100644 Libraries/vendor/fbjs/TouchEventUtils.js create mode 100644 Libraries/vendor/fbjs/URI.js create mode 100644 Libraries/vendor/fbjs/UserAgent.js create mode 100644 Libraries/vendor/fbjs/UserAgentData.js create mode 100644 Libraries/vendor/fbjs/VersionRange.js create mode 100644 Libraries/vendor/fbjs/areEqual.js create mode 100644 Libraries/vendor/fbjs/base62.js create mode 100644 Libraries/vendor/fbjs/camelize.js create mode 100644 Libraries/vendor/fbjs/camelizeStyleName.js create mode 100644 Libraries/vendor/fbjs/containsNode.js create mode 100644 Libraries/vendor/fbjs/crc32.js create mode 100644 Libraries/vendor/fbjs/createArrayFromMixed.js create mode 100644 Libraries/vendor/fbjs/createNodesFromMarkup.js create mode 100644 Libraries/vendor/fbjs/emptyFunction.js create mode 100644 Libraries/vendor/fbjs/emptyObject.js create mode 100644 Libraries/vendor/fbjs/everyObject.js create mode 100644 Libraries/vendor/fbjs/fetchWithRetries.js create mode 100644 Libraries/vendor/fbjs/filterObject.js create mode 100644 Libraries/vendor/fbjs/flattenArray.js create mode 100644 Libraries/vendor/fbjs/focusNode.js create mode 100644 Libraries/vendor/fbjs/forEachObject.js create mode 100644 Libraries/vendor/fbjs/getActiveElement.js create mode 100644 Libraries/vendor/fbjs/getMarkupWrap.js create mode 100644 Libraries/vendor/fbjs/getUnboundedScrollPosition.js create mode 100644 Libraries/vendor/fbjs/hyphenate.js create mode 100644 Libraries/vendor/fbjs/hyphenateStyleName.js create mode 100644 Libraries/vendor/fbjs/invariant.js create mode 100644 Libraries/vendor/fbjs/isEmpty.js create mode 100644 Libraries/vendor/fbjs/isNode.js create mode 100644 Libraries/vendor/fbjs/isTextNode.js create mode 100644 Libraries/vendor/fbjs/joinClasses.js create mode 100644 Libraries/vendor/fbjs/keyMirror.js create mode 100644 Libraries/vendor/fbjs/keyOf.js create mode 100644 Libraries/vendor/fbjs/mapObject.js create mode 100644 Libraries/vendor/fbjs/memoizeStringOnly.js create mode 100644 Libraries/vendor/fbjs/monitorCodeUse.js create mode 100644 Libraries/vendor/fbjs/nativeRequestAnimationFrame.js create mode 100644 Libraries/vendor/fbjs/nullthrows.js create mode 100644 Libraries/vendor/fbjs/performance.js create mode 100644 Libraries/vendor/fbjs/performanceNow.js create mode 100644 Libraries/vendor/fbjs/removeFromArray.js create mode 100644 Libraries/vendor/fbjs/requestAnimationFrame.js create mode 100644 Libraries/vendor/fbjs/resolveImmediate.js create mode 100644 Libraries/vendor/fbjs/shallowEqual.js create mode 100644 Libraries/vendor/fbjs/someObject.js create mode 100644 Libraries/vendor/fbjs/sprintf.js create mode 100644 Libraries/vendor/fbjs/warning.js create mode 100644 Libraries/vendor/fbjs/xhrSimpleDataSerializer.js diff --git a/.flowconfig b/.flowconfig index 78c058204..026deca0e 100644 --- a/.flowconfig +++ b/.flowconfig @@ -14,12 +14,8 @@ # Ignore react and fbjs where there are overlaps, but don't ignore # anything that react-native relies on -.*/node_modules/fbjs/lib/Map.js -.*/node_modules/fbjs/lib/Promise.js .*/node_modules/fbjs/lib/fetch.js .*/node_modules/fbjs/lib/ExecutionEnvironment.js -.*/node_modules/fbjs/lib/isEmpty.js -.*/node_modules/fbjs/lib/crc32.js .*/node_modules/fbjs/lib/ErrorUtils.js # Flow has a built-in definition for the 'react' module which we prefer to use diff --git a/Libraries/Interaction/__tests__/InteractionManager-test.js b/Libraries/Interaction/__tests__/InteractionManager-test.js index 736fc93c5..032acf255 100644 --- a/Libraries/Interaction/__tests__/InteractionManager-test.js +++ b/Libraries/Interaction/__tests__/InteractionManager-test.js @@ -6,6 +6,7 @@ jest .autoMockOff() + .mock('ErrorUtils') .mock('BatchedBridge'); function expectToBeCalledOnce(fn) { diff --git a/Libraries/Promise.js b/Libraries/Promise.js index 004741948..6484dd176 100644 --- a/Libraries/Promise.js +++ b/Libraries/Promise.js @@ -1,30 +1,18 @@ /** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. * - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule Promise - * - * This module wraps and augments the minimally ES6-compliant Promise - * implementation provided by the promise npm package. + * @flow */ - 'use strict'; -global.setImmediate = require('setImmediate'); -var Promise = require('promise/setimmediate/es6-extensions'); -require('promise/setimmediate/done'); +const Promise = require('fbjs/lib/Promise'); // this will require Promise.native.js + if (__DEV__) { require('promise/setimmediate/rejection-tracking').enable({ allRejections: true, @@ -46,12 +34,4 @@ if (__DEV__) { }); } -/** - * Handle either fulfillment or rejection with the same callback. - */ -Promise.prototype.finally = function(onSettled) { - return this.then(onSettled, onSettled); -}; - - module.exports = Promise; diff --git a/Libraries/vendor/core/Map.js b/Libraries/vendor/core/Map.js deleted file mode 100644 index 114add77b..000000000 --- a/Libraries/vendor/core/Map.js +++ /dev/null @@ -1,626 +0,0 @@ -/** - * @generated SignedSource<<375749f44ce7c0f681fc1297943eaf74>> - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !! This file is a check-in of a static_upstream project! !! - * !! !! - * !! You should not modify this file directly. Instead: !! - * !! 1) Use `fjs use-upstream` to temporarily replace this with !! - * !! the latest version from upstream. !! - * !! 2) Make your changes, test them, etc. !! - * !! 3) Use `fjs push-upstream` to copy your changes back to !! - * !! static_upstream. !! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * Copyright 2013-2014 Facebook, Inc. - * @providesModule Map - * @preventMunge - * @typechecks - */ - -var guid = require('guid'); -var isNode = require('isNode'); -var toIterator = require('toIterator'); -var _shouldPolyfillES6Collection = require('_shouldPolyfillES6Collection'); - -module.exports = (function(global, undefined) { - // Since our implementation is spec-compliant for the most part we can safely - // delegate to a built-in version if exists and is implemented correctly. - // Firefox had gotten a few implementation details wrong across different - // versions so we guard against that. - if (!_shouldPolyfillES6Collection('Map')) { - return global.Map; - } - - /** - * == ES6 Map Collection == - * - * This module is meant to implement a Map collection as described in chapter - * 23.1 of the ES6 specification. - * - * Map objects are collections of key/value pairs where both the keys and - * values may be arbitrary ECMAScript language values. A distinct key value - * may only occur in one key/value pair within the Map's collection. - * - * https://people.mozilla.org/~jorendorff/es6-draft.html#sec-map-objects - * - * There only two -- rather small -- diviations from the spec: - * - * 1. The use of frozen objects as keys. - * We decided not to allow and simply throw an error. The reason being is - * we store a "hash" on the object for fast access to it's place in the - * internal map entries. - * If this turns out to be a popular use case it's possible to implement by - * overiding `Object.freeze` to store a "hash" property on the object - * for later use with the map. - * - * 2. The `size` property on a map object is a regular property and not a - * computed property on the prototype as described by the spec. - * The reason being is that we simply want to support ES3 environments - * which doesn't implement computed properties. - * - * == Usage == - * - * var map = new Map(iterable); - * - * map.set(key, value); - * map.get(key); // value - * map.has(key); // true - * map.delete(key); // true - * - * var iterator = map.keys(); - * iterator.next(); // {value: key, done: false} - * - * var iterator = map.values(); - * iterator.next(); // {value: value, done: false} - * - * var iterator = map.entries(); - * iterator.next(); // {value: [key, value], done: false} - * - * map.forEach(function(value, key){ this === thisArg }, thisArg); - * - * map.clear(); // resets map. - */ - - /** - * Constants - */ - - // Kinds of map iterations 23.1.5.3 - var KIND_KEY = 'key'; - var KIND_VALUE = 'value'; - var KIND_KEY_VALUE = 'key+value'; - - // In older browsers we can't create a null-prototype object so we have to - // defend against key collisions with built-in methods. - var KEY_PREFIX = '$map_'; - - // This property will be used as the internal size variable to disallow - // writing and to issue warnings for writings in development. - var SECRET_SIZE_PROP; - if (__DEV__) { - SECRET_SIZE_PROP = '$size' + guid(); - } - - // In oldIE we use the DOM Node `uniqueID` property to get create the hash. - var OLD_IE_HASH_PREFIX = 'IE_HASH_'; - - class Map { - - /** - * 23.1.1.1 - * Takes an `iterable` which is basically any object that implements a - * Symbol.iterator (@@iterator) method. The iterable is expected to be a - * collection of pairs. Each pair is a key/value pair that will be used - * to instantiate the map. - * - * @param {*} iterable - */ - constructor(iterable) { - if (!isObject(this)) { - throw new TypeError('Wrong map object type.'); - } - - initMap(this); - - if (iterable != null) { - var it = toIterator(iterable); - var next; - while (!(next = it.next()).done) { - if (!isObject(next.value)) { - throw new TypeError('Expected iterable items to be pair objects.'); - } - this.set(next.value[0], next.value[1]); - } - } - } - - /** - * 23.1.3.1 - * Clears the map from all keys and values. - */ - clear() { - initMap(this); - } - - /** - * 23.1.3.7 - * Check if a key exists in the collection. - * - * @param {*} key - * @return {boolean} - */ - has(key) { - var index = getIndex(this, key); - return !!(index != null && this._mapData[index]); - } - - /** - * 23.1.3.9 - * Adds a key/value pair to the collection. - * - * @param {*} key - * @param {*} value - * @return {map} - */ - set(key, value) { - var index = getIndex(this, key); - - if (index != null && this._mapData[index]) { - this._mapData[index][1] = value; - } else { - index = this._mapData.push([ - key, - value - ]) - 1; - setIndex(this, key, index); - if (__DEV__) { - this[SECRET_SIZE_PROP] += 1; - } else { - this.size += 1; - } - } - - return this; - } - - /** - * 23.1.3.6 - * Gets a value associated with a key in the collection. - * - * @param {*} key - * @return {*} - */ - get(key) { - var index = getIndex(this, key); - if (index == null) { - return undefined; - } else { - return this._mapData[index][1]; - } - } - - - /** - * 23.1.3.3 - * Delete a key/value from the collection. - * - * @param {*} key - * @return {boolean} Whether the key was found and deleted. - */ - delete(key) { - var index = getIndex(this, key); - if (index != null && this._mapData[index]) { - setIndex(this, key, undefined); - this._mapData[index] = undefined; - if (__DEV__) { - this[SECRET_SIZE_PROP] -= 1; - } else { - this.size -= 1; - } - return true; - } else { - return false; - } - } - - /** - * 23.1.3.4 - * Returns an iterator over the key/value pairs (in the form of an Array) in - * the collection. - * - * @return {MapIterator} - */ - entries() { - return new MapIterator(this, KIND_KEY_VALUE); - } - - /** - * 23.1.3.8 - * Returns an iterator over the keys in the collection. - * - * @return {MapIterator} - */ - keys() { - return new MapIterator(this, KIND_KEY); - } - - /** - * 23.1.3.11 - * Returns an iterator over the values pairs in the collection. - * - * @return {MapIterator} - */ - values() { - return new MapIterator(this, KIND_VALUE); - } - - /** - * 23.1.3.5 - * Iterates over the key/value pairs in the collection calling `callback` - * with [value, key, map]. An optional `thisArg` can be passed to set the - * context when `callback` is called. - * - * @param {function} callback - * @param {?object} thisArg - */ - forEach(callback, thisArg) { - if (typeof callback !== 'function') { - throw new TypeError('Callback must be callable.'); - } - - var boundCallback = callback.bind(thisArg || undefined); - var mapData = this._mapData; - - // Note that `mapData.length` should be computed on each iteration to - // support iterating over new items in the map that were added after the - // start of the iteration. - for (var i = 0; i < mapData.length; i++) { - var entry = mapData[i]; - if (entry != null) { - boundCallback(entry[1], entry[0], this); - } - } - } - } - - // 23.1.3.12 - Map.prototype[toIterator.ITERATOR_SYMBOL] = Map.prototype.entries; - - class MapIterator { - - /** - * 23.1.5.1 - * Create a `MapIterator` for a given `map`. While this class is private it - * will create objects that will be passed around publicily. - * - * @param {map} map - * @param {string} kind - */ - constructor(map, kind) { - if (!(isObject(map) && map['_mapData'])) { - throw new TypeError('Object is not a map.'); - } - - if ([KIND_KEY, KIND_KEY_VALUE, KIND_VALUE].indexOf(kind) === -1) { - throw new Error('Invalid iteration kind.'); - } - - this._map = map; - this._nextIndex = 0; - this._kind = kind; - } - - /** - * 23.1.5.2.1 - * Get the next iteration. - * - * @return {object} - */ - next() { - if (!this instanceof Map) { - throw new TypeError('Expected to be called on a MapIterator.'); - } - - var map = this._map; - var index = this._nextIndex; - var kind = this._kind; - - if (map == null) { - return createIterResultObject(undefined, true); - } - - var entries = map['_mapData']; - - while (index < entries.length) { - var record = entries[index]; - - index += 1; - this._nextIndex = index; - - if (record) { - if (kind === KIND_KEY) { - return createIterResultObject(record[0], false); - } else if (kind === KIND_VALUE) { - return createIterResultObject(record[1], false); - } else if (kind) { - return createIterResultObject(record, false); - } - } - } - - this._map = undefined; - - return createIterResultObject(undefined, true); - } - } - - // We can put this in the class definition once we have computed props - // transform. - // 23.1.5.2.2 - MapIterator.prototype[toIterator.ITERATOR_SYMBOL] = function() { - return this; - } - - /** - * Helper Functions. - */ - - /** - * Return an index to map.[[MapData]] array for a given Key. - * - * @param {map} map - * @param {*} key - * @return {?number} - */ - function getIndex(map, key) { - if (isObject(key)) { - var hash = getHash(key); - return map._objectIndex[hash]; - } else { - var prefixedKey = KEY_PREFIX + key; - if (typeof key === 'string') { - return map._stringIndex[prefixedKey]; - } else { - return map._otherIndex[prefixedKey]; - } - } - } - - /** - * Setup an index that refer to the key's location in map.[[MapData]]. - * - * @param {map} map - * @param {*} key - */ - function setIndex(map, key, index) { - var shouldDelete = index == null; - - if (isObject(key)) { - var hash = getHash(key); - if (shouldDelete) { - delete map._objectIndex[hash]; - } else { - map._objectIndex[hash] = index; - } - } else { - var prefixedKey = KEY_PREFIX + key; - if (typeof key === 'string') { - if (shouldDelete) { - delete map._stringIndex[prefixedKey]; - } else { - map._stringIndex[prefixedKey] = index; - } - } else { - if (shouldDelete) { - delete map._otherIndex[prefixedKey]; - } else { - map._otherIndex[prefixedKey] = index; - } - } - } - } - - /** - * Instantiate a map with internal slots. - * - * @param {map} map - */ - function initMap(map) { - // Data structure design inspired by Traceur's Map implementation. - // We maintain an internal array for all the entries. The array is needed - // to remember order. However, to have a reasonable HashMap performance - // i.e. O(1) for insertion, deletion, and retrieval. We maintain indices - // in objects for fast look ups. Indices are split up according to data - // types to avoid collisions. - map._mapData = []; - - // Object index maps from an object "hash" to index. The hash being a unique - // property of our choosing that we associate with the object. Association - // is done by ways of keeping a non-enumerable property on the object. - // Ideally these would be `Object.create(null)` objects but since we're - // trying to support ES3 we'll have to gaurd against collisions using - // prefixes on the keys rather than rely on null prototype objects. - map._objectIndex = {}; - - // String index maps from strings to index. - map._stringIndex = {}; - - // Numbers, booleans, undefined, and null. - map._otherIndex = {}; - - // Unfortunately we have to support ES3 and cannot have `Map.prototype.size` - // be a getter method but just a regular method. The biggest problem with - // this is safety. Clients can change the size property easily and possibly - // without noticing (e.g. `if (map.size = 1) {..}` kind of typo). What we - // can do to mitigate use getters and setters in development to disallow - // and issue a warning for changing the `size` property. - if (__DEV__) { - if (isES5) { - // If the `SECRET_SIZE_PROP` property is already defined then we're not - // in the first call to `initMap` (e.g. coming from `map.clear()`) so - // all we need to do is reset the size without defining the properties. - if (map.hasOwnProperty(SECRET_SIZE_PROP)) { - map[SECRET_SIZE_PROP] = 0; - } else { - Object.defineProperty(map, SECRET_SIZE_PROP, { - value: 0, - writable: true - }); - Object.defineProperty(map, 'size', { - set: (v) => { - console.error( - 'PLEASE FIX ME: You are changing the map size property which ' + - 'should not be writable and will break in production.' - ); - throw new Error('The map size property is not writable.'); - }, - get: () => map[SECRET_SIZE_PROP] - }); - } - - // NOTE: Early return to implement immutable `.size` in DEV. - return; - } - } - - // This is a diviation from the spec. `size` should be a getter on - // `Map.prototype`. However, we have to support IE8. - map.size = 0; - } - - /** - * Check if something is an object. - * - * @param {*} o - * @return {boolean} - */ - function isObject(o) { - return o != null && (typeof o === 'object' || typeof o === 'function'); - } - - /** - * Create an iteration object. - * - * @param {*} value - * @param {boolean} done - * @return {object} - */ - function createIterResultObject(value, done) { - return {value, done}; - } - - // Are we in a legit ES5 environment. Spoiler alert: that doesn't include IE8. - var isES5 = (function() { - try { - Object.defineProperty({}, 'x', {}); - return true; - } catch(e) { - return false; - } - })(); - - /** - * Check if an object can be extended. - * - * @param {object|array|function|regexp} o - * @return {boolean} - */ - function isExtensible(o) { - if (!isES5) { - return true; - } else { - return Object.isExtensible(o); - } - } - - /** - * IE has a `uniqueID` set on every DOM node. So we construct the hash from - * this uniqueID to avoid memory leaks and the IE cloneNode bug where it - * clones properties in addition to the attributes. - * - * @param {object} node - * @return {?string} - */ - function getIENodeHash(node) { - var uniqueID; - switch (node.nodeType) { - case 1: // Element - uniqueID = node.uniqueID; - break; - case 9: // Document - uniqueID = node.documentElement.uniqueID; - break; - default: - return null; - } - - if (uniqueID) { - return OLD_IE_HASH_PREFIX + uniqueID; - } else { - return null; - } - } - - var getHash = (function() { - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - var hashProperty = guid(); - var hashCounter = 0; - - /** - * Get the "hash" associated with an object. - * - * @param {object|array|function|regexp} o - * @return {number} - */ - return function getHash(o) { - if (o[hashProperty]) { - return o[hashProperty]; - } else if (!isES5 && - o.propertyIsEnumerable && - o.propertyIsEnumerable[hashProperty]) { - return o.propertyIsEnumerable[hashProperty]; - } else if (!isES5 && - isNode(o) && - getIENodeHash(o)) { - return getIENodeHash(o); - } else if (!isES5 && o[hashProperty]) { - return o[hashProperty]; - } - - if (isExtensible(o)) { - hashCounter += 1; - if (isES5) { - Object.defineProperty(o, hashProperty, { - enumerable: false, - writable: false, - configurable: false, - value: hashCounter - }); - } else if (o.propertyIsEnumerable) { - // Since we can't define a non-enumerable property on the object - // we'll hijack one of the less-used non-enumerable properties to - // save our hash on it. Addiotionally, since this is a function it - // will not show up in `JSON.stringify` which is what we want. - o.propertyIsEnumerable = function() { - return propIsEnumerable.apply(this, arguments); - }; - o.propertyIsEnumerable[hashProperty] = hashCounter; - } else if (isNode(o)) { - // At this point we couldn't get the IE `uniqueID` to use as a hash - // and we couldn't use a non-enumerable property to exploit the - // dontEnum bug so we simply add the `hashProperty` on the node - // itself. - o[hashProperty] = hashCounter; - } else { - throw new Error('Unable to set a non-enumerable property on object.'); - } - return hashCounter; - } else { - throw new Error('Non-extensible objects are not allowed as keys.'); - } - }; - })(); - - return Map; -})(/* jslint evil: true */ Function('return this')()); diff --git a/Libraries/vendor/core/isEmpty.js b/Libraries/vendor/core/isEmpty.js deleted file mode 100644 index 27f4c0069..000000000 --- a/Libraries/vendor/core/isEmpty.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @generated SignedSource<<97ffcebc9ae390e734026a4f3964bff6>> - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !! This file is a check-in of a static_upstream project! !! - * !! !! - * !! You should not modify this file directly. Instead: !! - * !! 1) Use `fjs use-upstream` to temporarily replace this with !! - * !! the latest version from upstream. !! - * !! 2) Make your changes, test them, etc. !! - * !! 3) Use `fjs push-upstream` to copy your changes back to !! - * !! static_upstream. !! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * @providesModule isEmpty - */ - -/** - * Mimics empty from PHP. - */ -function isEmpty(obj) { - if (Array.isArray(obj)) { - return obj.length === 0; - } else if (typeof obj === 'object') { - for (var i in obj) { - return false; - } - return true; - } else { - return !obj; - } -} - -module.exports = isEmpty; diff --git a/Libraries/vendor/crypto/crc32.js b/Libraries/vendor/crypto/crc32.js deleted file mode 100644 index 540d60aa8..000000000 --- a/Libraries/vendor/crypto/crc32.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @generated SignedSource<<77bdeb858138636c96c405d64b6be55c>> - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !! This file is a check-in of a static_upstream project! !! - * !! !! - * !! You should not modify this file directly. Instead: !! - * !! 1) Use `fjs use-upstream` to temporarily replace this with !! - * !! the latest version from upstream. !! - * !! 2) Make your changes, test them, etc. !! - * !! 3) Use `fjs push-upstream` to copy your changes back to !! - * !! static_upstream. !! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @providesModule crc32 - */ - -/* jslint bitwise: true */ - -/** - * Modified from the original for performance improvements. - * - * @see http://create.stephan-brumme.com/crc32/ - * @see http://stackoverflow.com/questions/18638900/ - * @copyright 2006 Andrea Ercolino - * @license MIT - */ - -var table = [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, - 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, - 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, - 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, - 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, - 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, - 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, - 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, - 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, - 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, - 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, - 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, - 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, - 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, - 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, - 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, - 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, - 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, - 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, - 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, - 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, - 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, - 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, - 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, - 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, - 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, - 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, - 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, - 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, - 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, - 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D -]; - -if (global.Int32Array !== undefined) { - table = new Int32Array(table); -} - -/** - * @returns Number - */ -function crc32(str) { - var crc = -1; - for (var i = 0, len = str.length; i < len; i++) { - crc = (crc >>> 8) ^ table[(crc ^ str.charCodeAt(i)) & 0xFF]; - } - return ~crc; -} - -module.exports = crc32; diff --git a/Libraries/vendor/fbjs/CSSCore.js b/Libraries/vendor/fbjs/CSSCore.js new file mode 100644 index 000000000..70f72f767 --- /dev/null +++ b/Libraries/vendor/fbjs/CSSCore.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSCore + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/CSSCore'); diff --git a/Libraries/vendor/fbjs/Deferred.js b/Libraries/vendor/fbjs/Deferred.js new file mode 100644 index 000000000..88704b839 --- /dev/null +++ b/Libraries/vendor/fbjs/Deferred.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Deferred + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/Deferred'); diff --git a/Libraries/vendor/fbjs/EventListener.js b/Libraries/vendor/fbjs/EventListener.js new file mode 100644 index 000000000..ec6041de3 --- /dev/null +++ b/Libraries/vendor/fbjs/EventListener.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventListener + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/EventListener'); diff --git a/Libraries/vendor/fbjs/Map.js b/Libraries/vendor/fbjs/Map.js new file mode 100644 index 000000000..4fd97503b --- /dev/null +++ b/Libraries/vendor/fbjs/Map.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Map + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/Map'); diff --git a/Libraries/vendor/fbjs/PromiseMap.js b/Libraries/vendor/fbjs/PromiseMap.js new file mode 100644 index 000000000..30891f521 --- /dev/null +++ b/Libraries/vendor/fbjs/PromiseMap.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule PromiseMap + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/PromiseMap'); diff --git a/Libraries/vendor/fbjs/TouchEventUtils.js b/Libraries/vendor/fbjs/TouchEventUtils.js new file mode 100644 index 000000000..f75be6944 --- /dev/null +++ b/Libraries/vendor/fbjs/TouchEventUtils.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule TouchEventUtils + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/TouchEventUtils'); diff --git a/Libraries/vendor/fbjs/URI.js b/Libraries/vendor/fbjs/URI.js new file mode 100644 index 000000000..72c565001 --- /dev/null +++ b/Libraries/vendor/fbjs/URI.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule URI + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/URI'); diff --git a/Libraries/vendor/fbjs/UserAgent.js b/Libraries/vendor/fbjs/UserAgent.js new file mode 100644 index 000000000..85c2669b8 --- /dev/null +++ b/Libraries/vendor/fbjs/UserAgent.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule UserAgent + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/UserAgent'); diff --git a/Libraries/vendor/fbjs/UserAgentData.js b/Libraries/vendor/fbjs/UserAgentData.js new file mode 100644 index 000000000..13ff6a335 --- /dev/null +++ b/Libraries/vendor/fbjs/UserAgentData.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule UserAgentData + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/UserAgentData'); diff --git a/Libraries/vendor/fbjs/VersionRange.js b/Libraries/vendor/fbjs/VersionRange.js new file mode 100644 index 000000000..de55fe189 --- /dev/null +++ b/Libraries/vendor/fbjs/VersionRange.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule VersionRange + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/VersionRange'); diff --git a/Libraries/vendor/fbjs/areEqual.js b/Libraries/vendor/fbjs/areEqual.js new file mode 100644 index 000000000..8c020878a --- /dev/null +++ b/Libraries/vendor/fbjs/areEqual.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule areEqual + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/areEqual'); diff --git a/Libraries/vendor/fbjs/base62.js b/Libraries/vendor/fbjs/base62.js new file mode 100644 index 000000000..596b871dc --- /dev/null +++ b/Libraries/vendor/fbjs/base62.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule base62 + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/base62'); diff --git a/Libraries/vendor/fbjs/camelize.js b/Libraries/vendor/fbjs/camelize.js new file mode 100644 index 000000000..356cfefaa --- /dev/null +++ b/Libraries/vendor/fbjs/camelize.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelize + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/camelize'); diff --git a/Libraries/vendor/fbjs/camelizeStyleName.js b/Libraries/vendor/fbjs/camelizeStyleName.js new file mode 100644 index 000000000..a92ed2c10 --- /dev/null +++ b/Libraries/vendor/fbjs/camelizeStyleName.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelizeStyleName + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/camelizeStyleName'); diff --git a/Libraries/vendor/fbjs/containsNode.js b/Libraries/vendor/fbjs/containsNode.js new file mode 100644 index 000000000..67d65e4f4 --- /dev/null +++ b/Libraries/vendor/fbjs/containsNode.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule containsNode + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/containsNode'); diff --git a/Libraries/vendor/fbjs/crc32.js b/Libraries/vendor/fbjs/crc32.js new file mode 100644 index 000000000..cb4fba1a2 --- /dev/null +++ b/Libraries/vendor/fbjs/crc32.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule crc32 + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/crc32'); diff --git a/Libraries/vendor/fbjs/createArrayFromMixed.js b/Libraries/vendor/fbjs/createArrayFromMixed.js new file mode 100644 index 000000000..6489c4774 --- /dev/null +++ b/Libraries/vendor/fbjs/createArrayFromMixed.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createArrayFromMixed + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/createArrayFromMixed'); diff --git a/Libraries/vendor/fbjs/createNodesFromMarkup.js b/Libraries/vendor/fbjs/createNodesFromMarkup.js new file mode 100644 index 000000000..fb5899c0f --- /dev/null +++ b/Libraries/vendor/fbjs/createNodesFromMarkup.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createNodesFromMarkup + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/createNodesFromMarkup'); diff --git a/Libraries/vendor/fbjs/emptyFunction.js b/Libraries/vendor/fbjs/emptyFunction.js new file mode 100644 index 000000000..ac55c276a --- /dev/null +++ b/Libraries/vendor/fbjs/emptyFunction.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/emptyFunction'); diff --git a/Libraries/vendor/fbjs/emptyObject.js b/Libraries/vendor/fbjs/emptyObject.js new file mode 100644 index 000000000..f738081cc --- /dev/null +++ b/Libraries/vendor/fbjs/emptyObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/emptyObject'); diff --git a/Libraries/vendor/fbjs/everyObject.js b/Libraries/vendor/fbjs/everyObject.js new file mode 100644 index 000000000..4fe49e035 --- /dev/null +++ b/Libraries/vendor/fbjs/everyObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule everyObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/everyObject'); diff --git a/Libraries/vendor/fbjs/fetchWithRetries.js b/Libraries/vendor/fbjs/fetchWithRetries.js new file mode 100644 index 000000000..16d1e1aa9 --- /dev/null +++ b/Libraries/vendor/fbjs/fetchWithRetries.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule fetchWithRetries + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/fetchWithRetries'); diff --git a/Libraries/vendor/fbjs/filterObject.js b/Libraries/vendor/fbjs/filterObject.js new file mode 100644 index 000000000..819e188e4 --- /dev/null +++ b/Libraries/vendor/fbjs/filterObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule filterObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/filterObject'); diff --git a/Libraries/vendor/fbjs/flattenArray.js b/Libraries/vendor/fbjs/flattenArray.js new file mode 100644 index 000000000..14f12d6a4 --- /dev/null +++ b/Libraries/vendor/fbjs/flattenArray.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule flattenArray + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/flattenArray'); diff --git a/Libraries/vendor/fbjs/focusNode.js b/Libraries/vendor/fbjs/focusNode.js new file mode 100644 index 000000000..91df968db --- /dev/null +++ b/Libraries/vendor/fbjs/focusNode.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule focusNode + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/focusNode'); diff --git a/Libraries/vendor/fbjs/forEachObject.js b/Libraries/vendor/fbjs/forEachObject.js new file mode 100644 index 000000000..1e5b39f29 --- /dev/null +++ b/Libraries/vendor/fbjs/forEachObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule forEachObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/forEachObject'); diff --git a/Libraries/vendor/fbjs/getActiveElement.js b/Libraries/vendor/fbjs/getActiveElement.js new file mode 100644 index 000000000..cb597c5a2 --- /dev/null +++ b/Libraries/vendor/fbjs/getActiveElement.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getActiveElement + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/getActiveElement'); diff --git a/Libraries/vendor/fbjs/getMarkupWrap.js b/Libraries/vendor/fbjs/getMarkupWrap.js new file mode 100644 index 000000000..8673d4630 --- /dev/null +++ b/Libraries/vendor/fbjs/getMarkupWrap.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getMarkupWrap + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/getMarkupWrap'); diff --git a/Libraries/vendor/fbjs/getUnboundedScrollPosition.js b/Libraries/vendor/fbjs/getUnboundedScrollPosition.js new file mode 100644 index 000000000..a72586ef4 --- /dev/null +++ b/Libraries/vendor/fbjs/getUnboundedScrollPosition.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getUnboundedScrollPosition + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/getUnboundedScrollPosition'); diff --git a/Libraries/vendor/fbjs/hyphenate.js b/Libraries/vendor/fbjs/hyphenate.js new file mode 100644 index 000000000..00cec2c76 --- /dev/null +++ b/Libraries/vendor/fbjs/hyphenate.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenate + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/hyphenate'); diff --git a/Libraries/vendor/fbjs/hyphenateStyleName.js b/Libraries/vendor/fbjs/hyphenateStyleName.js new file mode 100644 index 000000000..b1349ea09 --- /dev/null +++ b/Libraries/vendor/fbjs/hyphenateStyleName.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenateStyleName + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/hyphenateStyleName'); diff --git a/Libraries/vendor/fbjs/invariant.js b/Libraries/vendor/fbjs/invariant.js new file mode 100644 index 000000000..1a1970244 --- /dev/null +++ b/Libraries/vendor/fbjs/invariant.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/invariant'); diff --git a/Libraries/vendor/fbjs/isEmpty.js b/Libraries/vendor/fbjs/isEmpty.js new file mode 100644 index 000000000..3d9ae58e9 --- /dev/null +++ b/Libraries/vendor/fbjs/isEmpty.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isEmpty + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/isEmpty'); diff --git a/Libraries/vendor/fbjs/isNode.js b/Libraries/vendor/fbjs/isNode.js new file mode 100644 index 000000000..d99b32dad --- /dev/null +++ b/Libraries/vendor/fbjs/isNode.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isNode + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/isNode'); diff --git a/Libraries/vendor/fbjs/isTextNode.js b/Libraries/vendor/fbjs/isTextNode.js new file mode 100644 index 000000000..7b39b1698 --- /dev/null +++ b/Libraries/vendor/fbjs/isTextNode.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextNode + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/isTextNode'); diff --git a/Libraries/vendor/fbjs/joinClasses.js b/Libraries/vendor/fbjs/joinClasses.js new file mode 100644 index 000000000..8e7908a9d --- /dev/null +++ b/Libraries/vendor/fbjs/joinClasses.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule joinClasses + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/joinClasses'); diff --git a/Libraries/vendor/fbjs/keyMirror.js b/Libraries/vendor/fbjs/keyMirror.js new file mode 100644 index 000000000..021b34052 --- /dev/null +++ b/Libraries/vendor/fbjs/keyMirror.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyMirror + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/keyMirror'); diff --git a/Libraries/vendor/fbjs/keyOf.js b/Libraries/vendor/fbjs/keyOf.js new file mode 100644 index 000000000..646040a57 --- /dev/null +++ b/Libraries/vendor/fbjs/keyOf.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyOf + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/keyOf'); diff --git a/Libraries/vendor/fbjs/mapObject.js b/Libraries/vendor/fbjs/mapObject.js new file mode 100644 index 000000000..a74e35737 --- /dev/null +++ b/Libraries/vendor/fbjs/mapObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule mapObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/mapObject'); diff --git a/Libraries/vendor/fbjs/memoizeStringOnly.js b/Libraries/vendor/fbjs/memoizeStringOnly.js new file mode 100644 index 000000000..36d4d3145 --- /dev/null +++ b/Libraries/vendor/fbjs/memoizeStringOnly.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule memoizeStringOnly + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/memoizeStringOnly'); diff --git a/Libraries/vendor/fbjs/monitorCodeUse.js b/Libraries/vendor/fbjs/monitorCodeUse.js new file mode 100644 index 000000000..c06614c17 --- /dev/null +++ b/Libraries/vendor/fbjs/monitorCodeUse.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule monitorCodeUse + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/monitorCodeUse'); diff --git a/Libraries/vendor/fbjs/nativeRequestAnimationFrame.js b/Libraries/vendor/fbjs/nativeRequestAnimationFrame.js new file mode 100644 index 000000000..5ff2ba2a8 --- /dev/null +++ b/Libraries/vendor/fbjs/nativeRequestAnimationFrame.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule nativeRequestAnimationFrame + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/nativeRequestAnimationFrame'); diff --git a/Libraries/vendor/fbjs/nullthrows.js b/Libraries/vendor/fbjs/nullthrows.js new file mode 100644 index 000000000..5de73280d --- /dev/null +++ b/Libraries/vendor/fbjs/nullthrows.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule nullthrows + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/nullthrows'); diff --git a/Libraries/vendor/fbjs/performance.js b/Libraries/vendor/fbjs/performance.js new file mode 100644 index 000000000..eab35d18d --- /dev/null +++ b/Libraries/vendor/fbjs/performance.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performance + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/performance'); diff --git a/Libraries/vendor/fbjs/performanceNow.js b/Libraries/vendor/fbjs/performanceNow.js new file mode 100644 index 000000000..fa0c50535 --- /dev/null +++ b/Libraries/vendor/fbjs/performanceNow.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performanceNow + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/performanceNow'); diff --git a/Libraries/vendor/fbjs/removeFromArray.js b/Libraries/vendor/fbjs/removeFromArray.js new file mode 100644 index 000000000..0af09ec36 --- /dev/null +++ b/Libraries/vendor/fbjs/removeFromArray.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule removeFromArray + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/removeFromArray'); diff --git a/Libraries/vendor/fbjs/requestAnimationFrame.js b/Libraries/vendor/fbjs/requestAnimationFrame.js new file mode 100644 index 000000000..1671e27ef --- /dev/null +++ b/Libraries/vendor/fbjs/requestAnimationFrame.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule requestAnimationFrame + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/requestAnimationFrame'); diff --git a/Libraries/vendor/fbjs/resolveImmediate.js b/Libraries/vendor/fbjs/resolveImmediate.js new file mode 100644 index 000000000..e587c24da --- /dev/null +++ b/Libraries/vendor/fbjs/resolveImmediate.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule resolveImmediate + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/resolveImmediate'); diff --git a/Libraries/vendor/fbjs/shallowEqual.js b/Libraries/vendor/fbjs/shallowEqual.js new file mode 100644 index 000000000..065a3e682 --- /dev/null +++ b/Libraries/vendor/fbjs/shallowEqual.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shallowEqual + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/shallowEqual'); diff --git a/Libraries/vendor/fbjs/someObject.js b/Libraries/vendor/fbjs/someObject.js new file mode 100644 index 000000000..edd2cdd7b --- /dev/null +++ b/Libraries/vendor/fbjs/someObject.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule someObject + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/someObject'); diff --git a/Libraries/vendor/fbjs/sprintf.js b/Libraries/vendor/fbjs/sprintf.js new file mode 100644 index 000000000..f4140fc06 --- /dev/null +++ b/Libraries/vendor/fbjs/sprintf.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule sprintf + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/sprintf'); diff --git a/Libraries/vendor/fbjs/warning.js b/Libraries/vendor/fbjs/warning.js new file mode 100644 index 000000000..7ae0cdf81 --- /dev/null +++ b/Libraries/vendor/fbjs/warning.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule warning + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/warning'); diff --git a/Libraries/vendor/fbjs/xhrSimpleDataSerializer.js b/Libraries/vendor/fbjs/xhrSimpleDataSerializer.js new file mode 100644 index 000000000..d0d9b2c60 --- /dev/null +++ b/Libraries/vendor/fbjs/xhrSimpleDataSerializer.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule xhrSimpleDataSerializer + * @flow + */ +'use strict'; + +module.exports = require('fbjs/lib/xhrSimpleDataSerializer'); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index dc7c0be87..9826948e1 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -142,15 +142,15 @@ "from": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz" }, - "recast": { - "version": "0.10.33", - "from": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz" - }, "regenerator": { "version": "0.8.40", "from": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.40.tgz", "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.40.tgz" + }, + "recast": { + "version": "0.10.33", + "from": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz" } } }, @@ -1815,19 +1815,21 @@ "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.1.0.tgz" }, "fbjs": { - "version": "0.6.0", - "from": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.0.tgz", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.0.tgz", + "version": "0.7.2", + "from": "fbjs@0.7.2", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.7.2.tgz", "dependencies": { - "ua-parser-js": { - "version": "0.7.10", - "from": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.10.tgz", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.10.tgz" - }, - "whatwg-fetch": { - "version": "0.9.0", - "from": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz" + "isomorphic-fetch": { + "version": "2.2.1", + "from": "isomorphic-fetch@>=2.1.1 <3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "dependencies": { + "whatwg-fetch": { + "version": "0.11.0", + "from": "whatwg-fetch@>=0.10.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.11.0.tgz" + } + } } } }, @@ -1915,16 +1917,16 @@ "from": "are-we-there-yet@~1.0.0", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.0.4.tgz" }, - "asn1": { - "version": "0.1.11", - "from": "asn1@0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" - }, "assert-plus": { "version": "0.1.5", "from": "assert-plus@^0.1.5", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz" }, + "asn1": { + "version": "0.1.11", + "from": "asn1@0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" + }, "async": { "version": "1.5.0", "from": "async@^1.4.0", @@ -1950,6 +1952,11 @@ "from": "boom@^2.8.x", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" }, + "caseless": { + "version": "0.11.0", + "from": "caseless@~0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" + }, "brace-expansion": { "version": "1.1.1", "from": "brace-expansion@>=1.0.0 <2.0.0", @@ -1960,11 +1967,6 @@ "from": "chalk@^1.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz" }, - "caseless": { - "version": "0.11.0", - "from": "caseless@~0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" - }, "combined-stream": { "version": "1.0.5", "from": "combined-stream@~1.0.5", @@ -2065,36 +2067,36 @@ "from": "graceful-readlink@>= 1.0.0", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" }, - "has-ansi": { - "version": "2.0.0", - "from": "has-ansi@^2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" - }, "har-validator": { "version": "2.0.2", "from": "har-validator@~2.0.2", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.2.tgz" }, - "has-unicode": { - "version": "1.0.1", - "from": "has-unicode@^1.0.0", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz" + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@^2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" }, "hawk": { "version": "3.1.0", "from": "hawk@~3.1.0", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.0.tgz" }, - "hoek": { - "version": "2.16.3", - "from": "hoek@2.x.x", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + "has-unicode": { + "version": "1.0.1", + "from": "has-unicode@^1.0.0", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-1.0.1.tgz" }, "http-signature": { "version": "0.11.0", "from": "http-signature@~0.11.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.11.0.tgz" }, + "hoek": { + "version": "2.16.3", + "from": "hoek@2.x.x", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + }, "inherits": { "version": "2.0.1", "from": "inherits@*", @@ -2120,31 +2122,31 @@ "from": "isarray@0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" }, - "isstream": { - "version": "0.1.2", - "from": "isstream@~0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - }, "json-stringify-safe": { "version": "5.0.1", "from": "json-stringify-safe@~5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" }, + "isstream": { + "version": "0.1.2", + "from": "isstream@~0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, "jsonpointer": { "version": "2.0.0", "from": "jsonpointer@2.0.0", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" }, - "lodash._basetostring": { - "version": "3.0.1", - "from": "lodash._basetostring@^3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, "lodash._createpadding": { "version": "3.6.1", "from": "lodash._createpadding@^3.0.0", "resolved": "https://registry.npmjs.org/lodash._createpadding/-/lodash._createpadding-3.6.1.tgz" }, + "lodash._basetostring": { + "version": "3.0.1", + "from": "lodash._basetostring@^3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, "lodash.pad": { "version": "3.1.1", "from": "lodash.pad@^3.0.0", @@ -2210,16 +2212,16 @@ "from": "path-is-absolute@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" }, - "pinkie": { - "version": "1.0.0", - "from": "pinkie@^1.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz" - }, "pinkie-promise": { "version": "1.0.0", "from": "pinkie-promise@^1.0.0", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-1.0.0.tgz" }, + "pinkie": { + "version": "1.0.0", + "from": "pinkie@^1.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-1.0.0.tgz" + }, "qs": { "version": "5.2.0", "from": "qs@~5.2.0", @@ -2235,16 +2237,16 @@ "from": "request@2.x", "resolved": "https://registry.npmjs.org/request/-/request-2.65.0.tgz" }, - "sntp": { - "version": "1.0.9", - "from": "sntp@1.x.x", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" - }, "semver": { "version": "5.0.3", "from": "semver@~5.0.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz" }, + "sntp": { + "version": "1.0.9", + "from": "sntp@1.x.x", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + }, "string_decoder": { "version": "0.10.31", "from": "string_decoder@~0.10.x", @@ -2255,21 +2257,16 @@ "from": "stringstream@~0.0.4", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" }, - "strip-ansi": { - "version": "3.0.0", - "from": "strip-ansi@^3.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz" - }, - "supports-color": { - "version": "2.0.0", - "from": "supports-color@^2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, "strip-json-comments": { "version": "0.1.3", "from": "strip-json-comments@0.1.x", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz" }, + "strip-ansi": { + "version": "3.0.0", + "from": "strip-ansi@^3.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz" + }, "tar": { "version": "2.2.1", "from": "tar@~2.2.0", @@ -2280,6 +2277,11 @@ "from": "tough-cookie@~2.2.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.0.tgz" }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@^2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + }, "tunnel-agent": { "version": "0.4.1", "from": "tunnel-agent@~0.4.1", @@ -2344,15 +2346,15 @@ "from": "glob@>=5.0.14 <6.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" }, - "minimatch": { - "version": "3.0.0", - "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" - }, "once": { "version": "1.3.2", "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz" + }, + "minimatch": { + "version": "3.0.0", + "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" } } }, @@ -4058,6 +4060,18 @@ } } } + }, + "fbjs": { + "version": "0.6.1", + "from": "fbjs@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.1.tgz", + "dependencies": { + "whatwg-fetch": { + "version": "0.9.0", + "from": "whatwg-fetch@>=0.9.0 <0.10.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz" + } + } } } }, @@ -4544,6 +4558,11 @@ "from": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz", "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz" }, + "ua-parser-js": { + "version": "0.7.10", + "from": "ua-parser-js@>=0.7.9 <0.8.0", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.10.tgz" + }, "uglify-js": { "version": "2.4.24", "from": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", diff --git a/package.json b/package.json index 8e606d2fc..eb0789b01 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,8 @@ ], "unmockedModulePathPatterns": [ "promise", - "source-map" + "source-map", + "fbjs" ] }, "main": "Libraries/react-native/react-native.js", @@ -121,7 +122,7 @@ "connect": "^2.8.3", "debug": "^2.2.0", "event-target-shim": "^1.0.5", - "fbjs": "^0.6.0", + "fbjs": "^0.7.2", "fbjs-scripts": "^0.4.0", "graceful-fs": "^4.1.2", "image-size": "^0.3.5", diff --git a/packager/blacklist.js b/packager/blacklist.js index ee369e1af..318e09e88 100644 --- a/packager/blacklist.js +++ b/packager/blacklist.js @@ -17,36 +17,6 @@ var sharedBlacklist = [ 'node_modules/react/lib/React.js', 'node_modules/react/lib/ReactDOM.js', - // For each of these fbjs files (especially the non-forks/stubs), we should - // consider deleting the conflicting copy and just using the fbjs version. - // - // fbjs forks: - 'node_modules/fbjs/lib/Map.js', - 'node_modules/fbjs/lib/Promise.js', - 'node_modules/fbjs/lib/fetch.js', - // fbjs stubs: - 'node_modules/fbjs/lib/ErrorUtils.js', - 'node_modules/fbjs/lib/URI.js', - // fbjs modules: - 'node_modules/fbjs/lib/Deferred.js', - 'node_modules/fbjs/lib/PromiseMap.js', - 'node_modules/fbjs/lib/UserAgent.js', - 'node_modules/fbjs/lib/areEqual.js', - 'node_modules/fbjs/lib/base62.js', - 'node_modules/fbjs/lib/crc32.js', - 'node_modules/fbjs/lib/everyObject.js', - 'node_modules/fbjs/lib/fetchWithRetries.js', - 'node_modules/fbjs/lib/filterObject.js', - 'node_modules/fbjs/lib/flattenArray.js', - 'node_modules/fbjs/lib/forEachObject.js', - 'node_modules/fbjs/lib/isEmpty.js', - 'node_modules/fbjs/lib/nullthrows.js', - 'node_modules/fbjs/lib/removeFromArray.js', - 'node_modules/fbjs/lib/resolveImmediate.js', - 'node_modules/fbjs/lib/someObject.js', - 'node_modules/fbjs/lib/sprintf.js', - 'node_modules/fbjs/lib/xhrSimpleDataSerializer.js', - // Those conflicts with the ones in fbjs/. We need to blacklist the // internal version otherwise they won't work in open source. 'downstream/core/CSSCore.js', diff --git a/packager/react-packager/src/Resolver/index.js b/packager/react-packager/src/Resolver/index.js index a677c2199..10e138c8b 100644 --- a/packager/react-packager/src/Resolver/index.js +++ b/packager/react-packager/src/Resolver/index.js @@ -85,7 +85,6 @@ class Resolver { (opts.blacklistRE && opts.blacklistRE.test(filepath)); }, providesModuleNodeModules: [ - 'fbjs', 'react', 'react-native', // Parse requires AsyncStorage. They will