pax_global_header00006660000000000000000000000064133502264420014513gustar00rootroot0000000000000052 comment=61a7a5f4a16b9c71fbd4bc867ff9e2eccecd5505 fbjs-fbjs-v1.0.0/000077500000000000000000000000001335022644200135455ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/.eslintignore000066400000000000000000000002031335022644200162430ustar00rootroot00000000000000packages/fbjs/flow/ packages/fbjs/lib/ node_modules # TODO: Fix warnings upstream so this output becomes useful packages/fbjs/src/ fbjs-fbjs-v1.0.0/.eslintrc.js000066400000000000000000000001701335022644200160020ustar00rootroot00000000000000module.exports = { parser: 'babel-eslint', extends: [ require.resolve('./packages/eslint-config-fbjs'), ], }; fbjs-fbjs-v1.0.0/.gitignore000066400000000000000000000001151335022644200155320ustar00rootroot00000000000000node_modules npm-debug.log packages/fbjs/lib/* packages/fbjs/module-map.json fbjs-fbjs-v1.0.0/.travis.yml000066400000000000000000000002361335022644200156570ustar00rootroot00000000000000language: node_js node_js: - "6" - "8" env: - CMD=lint - CMD=fbjs:build - CMD=fbjs:test - CMD=fbjs:flow - CMD=preset:test script: yarn run $CMD fbjs-fbjs-v1.0.0/CODE_OF_CONDUCT.md000066400000000000000000000003711335022644200163450ustar00rootroot00000000000000# Code of Conduct Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated. fbjs-fbjs-v1.0.0/LICENSE000066400000000000000000000020701335022644200145510ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/README.md000066400000000000000000000015751335022644200150340ustar00rootroot00000000000000# FBJS ## Purpose To make it easier for Facebook to share and consume our own JavaScript. Primarily this will allow us to ship code without worrying too much about where it lives, keeping with the spirit of `@providesModule` but working in the broader JavaScript ecosystem. **Note:** If you are consuming the code here and you are not also a Facebook project, be prepared for a bad time. APIs may appear or disappear and we may not follow semver strictly, though we will do our best to. This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. In order for us to move fast and ship projects like React and Relay, we've made the decision to not support everybody. We probably won't take your feature requests unless they align with our needs. There will be overlap in functionality here and in other open source projects. fbjs-fbjs-v1.0.0/package.json000066400000000000000000000012511335022644200160320ustar00rootroot00000000000000{ "name": "fbjs-build", "private": true, "license": "MIT", "devDependencies": { "babel-eslint": "^7.2.3", "eslint": "^4.2.0", "eslint-plugin-babel": "^4.1.1", "eslint-config-fbjs": "0.0.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-react": "^7.1.0", "eslint-plugin-relay": "0.0.8" }, "scripts": { "lint": "eslint .", "fbjs:build": "cd packages/fbjs && yarn && yarn run build", "fbjs:test": "cd packages/fbjs && yarn && yarn run test", "fbjs:flow": "cd packages/fbjs && yarn && yarn run flow", "preset:test": "cd packages/babel-preset-fbjs && yarn && yarn run test" } } fbjs-fbjs-v1.0.0/packages/000077500000000000000000000000001335022644200153235ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/000077500000000000000000000000001335022644200206125ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/.gitignore000066400000000000000000000000331335022644200225760ustar00rootroot00000000000000node_modules npm-debug.log fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/.npmignore000066400000000000000000000000451335022644200226100ustar00rootroot00000000000000__tests__ node_modules npm-debug.log fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/CHANGELOG.md000066400000000000000000000026331335022644200224270ustar00rootroot00000000000000## [Unreleased] ## [2.1.4] - 2017-06-16 ### Fixed - `inline-requires` works with named imports and no longer leaks paths after use. ## [2.1.3] - 2017-06-08 ### Fixed - `inline-requires` will stop unintentionally using Flow declarations as bindings. ## [2.1.2] - 2017-05-02 ### Fixed - `inline-requires` works better with other transforms (eg 'babel-plugin-transform-es2015-modules-commonjs'). ## [2.1.1] - 2017-04-26 ### Fixed - `inline-requires` transform properly handles identifiers within functions whose definitions appear earlier in the file than the require call. ## [2.1.0] - 2016-10-07 ### Added - Modules using `__DEV__` will have the declaration inlined for `.js.flow` file generation. ### Fixed - `typeof` imports are properly rewritten. ## [2.0.0] - 2016-05-25 ### Added - More syntaxes are parsed for `.js.flow` file generation: `babel-plugin-syntax-class-properties` & `babel-plugin-syntax-jsx` - More transforms are applied for ES2015 and React support: `babel-plugin-transform-es2015-function-name`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-jsx` - New custom transform to convert `Object.assign` to `require('object-assign')`, ensuring the use of a ponyfill that checks for a spec-compliant `Object.assign`. ### Fixed - Type imports are properly rewritten with the rewrite-modules transform. ## [1.0.0] - 2016-04-28 ### Added - Initial release as a separate module. fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/LICENSE000066400000000000000000000020701335022644200216160ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/README.md000066400000000000000000000011651335022644200220740ustar00rootroot00000000000000# babel-preset-fbjs > Babel preset for Facebook projects. ## Install ```sh $ npm install --save-dev babel-preset-fbjs ``` ## Basic Usage ### Via `.babelrc` **.babelrc** ```json { "presets": ["fbjs"] } ``` ### Via CLI ```sh $ babel script.js --presets fbjs ``` ### Via Node API ```javascript require('@babel/core').transform('code', { presets: ['fbjs'] }); ``` ## Advanced Usage ```javascript require('@babel/core').transform('code', { presets: [ require('babel-preset-fbjs/configure')({ autoImport: true, inlineRequires: false, rewriteModules: {}, stripDEV: false } ] }); ``` fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/configure.js000066400000000000000000000072771335022644200231460ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* eslint-disable indent */ module.exports = function(options) { options = Object.assign({ autoImport: true, inlineRequires: process.env.NODE_ENV === 'test', objectAssign: true, rewriteModules: null, // {map: ?{[module: string]: string}, prefix: ?string} stripDEV: false, target: 'js', }, options); if (options.target !== 'js' && options.target !== 'flow') { throw new Error('options.target must be one of "js" or "flow".'); } // Always enable these. These will overlap with some transforms (which also // enable the corresponding syntax, eg Flow), but these are the minimal // additional syntaxes that need to be enabled so we can minimally transform // to .js.flow files as well. let presetSets = [ [ require('@babel/plugin-syntax-class-properties'), require('@babel/plugin-syntax-flow'), require('@babel/plugin-syntax-jsx'), require('babel-plugin-syntax-trailing-function-commas'), require('@babel/plugin-syntax-object-rest-spread'), options.autoImport ? require('./plugins/auto-importer') : null, options.rewriteModules ? [require('./plugins/rewrite-modules'), options.rewriteModules || {}] : null, ], [ options.inlineRequires ? require('./plugins/inline-requires') : null, options.stripDEV ? require('./plugins/dev-expression') : null, ] ]; // We only want to add declarations for flow transforms and not for js. So we // have to do this separate from above. if (options.target === 'flow') { presetSets[0].push(require('./plugins/dev-declaration')); } // Enable everything else for js. if (options.target === 'js') { presetSets[0] = presetSets[0].concat([ require('@babel/plugin-transform-template-literals'), require('@babel/plugin-transform-literals'), require('@babel/plugin-transform-function-name'), require('@babel/plugin-transform-arrow-functions'), require('@babel/plugin-transform-block-scoped-functions'), require('@babel/plugin-proposal-class-properties'), [require('@babel/plugin-transform-classes'), {loose: true}], require('@babel/plugin-transform-object-super'), require('@babel/plugin-transform-shorthand-properties'), require('@babel/plugin-transform-computed-properties'), require('@babel/plugin-transform-for-of'), require('@babel/plugin-check-constants'), [require('@babel/plugin-transform-spread'), {loose: true}], require('@babel/plugin-transform-parameters'), [require('@babel/plugin-transform-destructuring'), {loose: true}], require('@babel/plugin-transform-block-scoping'), require('@babel/plugin-transform-modules-commonjs'), require('@babel/plugin-transform-member-expression-literals'), require('@babel/plugin-transform-property-literals'), require('@babel/plugin-transform-flow-strip-types'), require('@babel/plugin-proposal-object-rest-spread'), require('@babel/plugin-transform-react-display-name'), require('@babel/plugin-transform-react-jsx'), // Don't enable this plugin unless we're compiling JS, even if the option is true options.objectAssign ? require('./plugins/object-assign') : null, ]); } // Use two passes to circumvent bug with auto-importer and inline-requires. const passPresets = presetSets.map(function(plugins) { return { plugins: plugins.filter(function(plugin) { return plugin != null; }), }; }); return { passPerPreset: true, presets: passPresets, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/index.js000066400000000000000000000003451335022644200222610ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ module.exports = require('./configure')({}); fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/package.json000066400000000000000000000040061335022644200231000ustar00rootroot00000000000000{ "name": "@babel/preset-fbjs", "version": "2.2.0", "description": "Babel preset for Facebook projects.", "repository": "facebook/fbjs", "license": "MIT", "main": "index.js", "scripts": { "test": "NODE_ENV=test jest" }, "dependencies": { "@babel/plugin-check-constants": "^7.0.0-beta.38", "@babel/plugin-syntax-class-properties": "^7.0.0", "@babel/plugin-syntax-flow": "^7.0.0", "@babel/plugin-syntax-jsx": "^7.0.0", "@babel/plugin-syntax-object-rest-spread": "^7.0.0", "babel-plugin-syntax-trailing-function-commas": "^7.0.0-beta.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-transform-arrow-functions": "^7.0.0", "@babel/plugin-transform-block-scoped-functions": "^7.0.0", "@babel/plugin-transform-block-scoping": "^7.0.0", "@babel/plugin-transform-classes": "^7.0.0", "@babel/plugin-transform-computed-properties": "^7.0.0", "@babel/plugin-transform-destructuring": "^7.0.0", "@babel/plugin-transform-for-of": "^7.0.0", "@babel/plugin-transform-function-name": "^7.0.0", "@babel/plugin-transform-literals": "^7.0.0", "@babel/plugin-transform-modules-commonjs": "^7.0.0", "@babel/plugin-transform-object-super": "^7.0.0", "@babel/plugin-transform-parameters": "^7.0.0", "@babel/plugin-transform-shorthand-properties": "^7.0.0", "@babel/plugin-transform-spread": "^7.0.0", "@babel/plugin-transform-template-literals": "^7.0.0", "@babel/plugin-transform-member-expression-literals": "^7.0.0", "@babel/plugin-transform-property-literals": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-transform-react-display-name": "^7.0.0", "@babel/plugin-transform-react-jsx": "^7.0.0" }, "devDependencies": { "@babel/core": "^7.0.0", "jest-cli": "^17.0.3" }, "jest": { "modulePathIgnorePatterns": [ "/node_modules/" ], "rootDir": "", "testPathDirs": [ "" ] } } fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/000077500000000000000000000000001335022644200222735ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/000077500000000000000000000000001335022644200242315ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/dev-declaration-test.js000066400000000000000000000013661335022644200306130ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* eslint-disable max-len */ let babel = require('@babel/core'); let devDeclaration = require('../dev-declaration'); function transform(input) { return babel.transform(input, { plugins: ['@babel/plugin-syntax-flow', devDeclaration], }).code; } function compare(input, output) { var compiled = transform(input); expect(compiled).toEqual(output); } describe('dev-declaration', function() { it('should replace calls', () => { compare( `if (__DEV__) console.log();`, `declare var __DEV__: boolean; if (__DEV__) console.log();`); }); }); fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/dev-expression-test.js000066400000000000000000000025411335022644200305210ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* eslint-disable max-len */ let babel = require('@babel/core'); let devExpression = require('../dev-expression'); function transform(input) { return babel.transform(input, { plugins: [devExpression], }).code; } function compare(input, output) { var compiled = transform(input); expect(compiled).toEqual(output); } var oldEnv; describe('dev-expression', function() { beforeEach(() => { oldEnv = process.env.NODE_ENV; process.env.NODE_ENV = ''; }); afterEach(() => { process.env.NODE_ENV = oldEnv; }); it('should replace __DEV__ in if', () => { compare( ` if (__DEV__) { console.log('foo') }`, `if (process.env.NODE_ENV !== "production") { console.log('foo'); }` ); }); it('should replace warning calls', () => { compare( "warning(condition, 'a %s b', 'c');", `process.env.NODE_ENV !== "production" ? warning(condition, 'a %s b', 'c') : void 0;` ); }); it('should replace invariant calls', () => { compare( "invariant(condition, 'a %s b', 'c');", `!condition ? process.env.NODE_ENV !== "production" ? invariant(false, 'a %s b', 'c') : invariant(false) : void 0;` ); }); }); fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/inline-requires-test.js000066400000000000000000000104201335022644200306540ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; jest.autoMockOff(); var babel = require('@babel/core'); describe('inline-requires', function() { it('should inline single usage', function() { compare([ 'var foo = require("foo");', 'foo.bar()', ], [ 'require("foo").bar();', ]); }); it('should inline multiple usage', function() { compare([ 'var foo = require("foo");', 'foo.bar()', 'foo.baz()', ], [ 'require("foo").bar();', 'require("foo").baz();', ]); }); it('should not matter the variable declaration length', function() { compare([ 'var foo = require("foo"), bar = require("bar"), baz = 4;', 'foo.method()', ], [ 'var baz = 4;', 'require("foo").method();', ]); compare([ 'var foo = require("foo"), bar = require("bar");', 'foo.method()', ], [ 'require("foo").method();', ]); }); it('should inline requires that are not assigned', function() { compare([ 'require("foo");', ], [ 'require("foo");', ]); }); it('should delete unused requires', function() { compare([ 'var foo = require("foo");', ], [ '', ]); }); it('should avoid inlining when re-assigning to a require', function() { compare([ 'var foo = require("foo");', 'foo = "bar";', ], [ 'var foo = require("foo");', 'foo = "bar";', ]); }); it('should properly handle identifiers declared before their corresponding require statement', function() { compare([ 'function foo() {', ' bar();', '}', 'var bar = require("baz");', 'foo();', 'bar();', ], [ 'function foo() {', ' require("baz")();', '}', 'foo();', 'require("baz")();', ]); }); it('should be compatible with destructuring', function() { compare([ 'var tmp = require("./a");', 'var a = tmp.a', 'var D = {', ' b: function(c) { c ? a(c.toString()) : a("No c!"); },', '};', ], [ 'var D = {', ' b: function (c) {', ' c ? require("./a").a(c.toString()) : require("./a").a("No c!");', ' }', '};', ]); }); it('should be compatible with other transforms like transform-modules-commonjs', function() { compare([ 'import Imported from "foo";', 'console.log(Imported);', ], [ 'var _foo = _interopRequireDefault(require("foo"));', 'function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }', 'console.log(_foo.default);', ]); }); it('should be compatible with `transform-modules-commonjs` when using named imports', function() { compare([ 'import {a} from "./a";', 'var D = {', ' b: function(c) { c ? a(c.toString()) : a("No c!"); },', '};', ], [ 'var D = {', ' b: function (c) {', ' c ? (0, require("./a").a)(c.toString()) : (0, require("./a").a)("No c!");', ' }', '};', ]); }); it('should inline the given method calls', function() { compare([ 'const inlinedCustom = customStuff("foo");', 'const inlinedRequire = require("bar");', '', 'inlinedCustom();', 'inlinedRequire();', ], [ 'customStuff("foo")();', 'require("bar")();', ], { inlineableCalls: ['customStuff'], }); }); it('should remove loc information from nodes', function() { var ast = transform(['var x = require("x"); x']).ast; var expression = ast.program.body[0].expression; function noLoc(node) { expect(node.start).toBeUndefined(); expect(node.end).toBeUndefined(); expect(node.loc).toBeUndefined(); } noLoc(expression); noLoc(expression.arguments[0]); }); }); function transform(input, opts) { return babel.transform(input.join('\n'), { ast: true, compact: true, plugins: [ [require('@babel/plugin-transform-modules-commonjs'), {strict: false}], [require('../inline-requires.js'), opts], ], }); } function compare(input, output, opts) { expect(transform(input, opts).code).toBe(transform(output, opts).code); } fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/object-assign-test.js000066400000000000000000000022041335022644200302720ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /* eslint-disable max-len */ let babel = require('@babel/core'); let assign = require('../object-assign'); function transform(input) { return babel.transform(input, { plugins: [assign], }).code; } function compare(input, output) { var compiled = transform(input); expect(compiled).toEqual(output); } describe('object-assign', function() { it('should replace calls', () => { compare( `Object.assign({}, null);`, `var _assign = require("object-assign"); _assign({}, null);` ); }); it('does not make multiple assignments', () => { compare( `Object.assign({}, null); Object.assign(Object.prototype, null)`, `var _assign = require("object-assign"); _assign({}, null); _assign(Object.prototype, null);` ); }); it('should replace simple access', () => { compare( `var assign = Object.assign; assign({}, null);`, `var _assign = require("object-assign"); var assign = _assign; assign({}, null);` ); }); }); fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/__tests__/rewrite-modules-test.js000066400000000000000000000060521335022644200306760ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; jest.dontMock('@babel/core'); jest.dontMock('../rewrite-modules'); describe('rewrite-modules', function() { let babel = require('@babel/core'); let rewriteModules = require('../rewrite-modules'); function normalizeResults(code) { return code && code.replace(/\s/g, ''); } describe('rewriteModules', function() { describe('opts._moduleMap', function() { it('should replace the prefix on normal requires', function() { let result = babel.transform( 'require(\'test\');', { plugins: [[rewriteModules, {map: {'test': 'test/test'}}]], } ); expect(result.code).toEqual('require("test/test");'); }); it('should replace the prefix on type imports', function() { let result = babel.transform( 'import type Test from "test";', { plugins: [ '@babel/plugin-syntax-flow', [rewriteModules, {map: {'test': 'test/test'}}] ], } ); expect(result.code).toEqual('import type Test from "test/test";'); }); it('should transform typeof imports', function() { const code = `import typeof Type from 'test';`; const expected = `import typeof Type from "test/test";`; const result = babel.transform( code, { plugins: [ '@babel/plugin-syntax-flow', [rewriteModules, {map: {test: 'test/test'}}], ], } ); expect(result.code).toEqual(expected); }); it('should transform jest and requireActual methods', function() { const code = `function test() { 'use strict'; jest.mock('foo'); jest.mock('foo').mock('bar').dontMock('baz'); var fooMock = jest.genMockFromModule('foo'); jest.unmock('foo'); jest.setMock('foo', () => {}); var foo = require('foo'); var actualFoo = require.requireActual('foo'); }`; const expected = `function test() { 'use strict'; jest.mock("foo/foo"); jest.mock("foo/foo").mock("bar/bar").dontMock("baz/baz"); var fooMock = jest.genMockFromModule("foo/foo"); jest.unmock("foo/foo"); jest.setMock("foo/foo", () => {}); var foo = require("foo/foo"); var actualFoo = require.requireActual("foo/foo"); }`; const rewritePlugin = [ rewriteModules, { map: { 'foo': 'foo/foo', 'bar': 'bar/bar', 'baz': 'baz/baz', }, }, ]; let result = babel.transform( code, { plugins: [rewritePlugin], } ); expect(normalizeResults(result.code)) .toEqual(normalizeResults(expected)); }); }); }); }); fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/auto-importer.js000066400000000000000000000025441335022644200254450ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const MODULES = [ // Local Promise implementation. 'Promise', ]; /** * Automatically imports a module if its identifier is in the AST. */ module.exports = function autoImporter(babel) { const t = babel.types; function isAppropriateModule(name, scope, state) { const autoImported = state.autoImported; return MODULES.indexOf(name) !== -1 && !autoImported.hasOwnProperty(name) && !scope.hasBinding(name, /*skip globals*/true); } return { pre: function() { // Cache per file to avoid calling `scope.hasBinding` several // times for the same module, which has already been auto-imported. this.autoImported = {}; }, visitor: { ReferencedIdentifier: function(path) { const node = path.node; const scope = path.scope; if (!isAppropriateModule(node.name, scope, this)) { return; } scope.getProgramParent().push({ id: t.identifier(node.name), init: t.callExpression( t.identifier('require'), [t.stringLiteral(node.name)] ), }); this.autoImported[node.name] = true; }, }, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/dev-declaration.js000066400000000000000000000021021335022644200256650ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = function(babel) { const t = babel.types; // We can't construct an identifier with a type annotation all in 1 fell swoop // so we have to create & mutate, then pass along. const DEV_IDENTIFIER = t.identifier('__DEV__'); DEV_IDENTIFIER.typeAnnotation = t.typeAnnotation(t.booleanTypeAnnotation()); const DEV_DECLARATION = t.declareVariable( DEV_IDENTIFIER ); return { pre() { this.usesDEV = false; }, visitor: { Identifier: { enter(path, file) { this.usesDEV = this.usesDEV || path.isIdentifier({name: '__DEV__'}); }, }, Program: { exit(path, file) { if (!this.usesDEV) { return; } // Add the declaration at the front of the body if we've used __DEV__. path.node.body.unshift(DEV_DECLARATION); }, }, }, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/dev-expression.js000066400000000000000000000076661335022644200256230ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = function(babel) { var t = babel.types; var SEEN_SYMBOL = Symbol(); var DEV_EXPRESSION = t.binaryExpression( '!==', t.memberExpression( t.memberExpression( t.identifier('process'), t.identifier('env'), false ), t.identifier('NODE_ENV'), false ), t.stringLiteral('production') ); return { visitor: { Identifier: { enter: function(path) { // Do nothing when testing if (process.env.NODE_ENV === 'test') { return; } // replace __DEV__ with process.env.NODE_ENV !== 'production' if (path.isIdentifier({name: '__DEV__'})) { path.replaceWith(DEV_EXPRESSION); } }, }, CallExpression: { exit: function(path) { var node = path.node; // Do nothing when testing if (process.env.NODE_ENV === 'test') { return; } // Ignore if it's already been processed if (node[SEEN_SYMBOL]) { return; } if (path.get('callee').isIdentifier({name: 'invariant'})) { // Turns this code: // // invariant(condition, argument, argument); // // into this: // // if (!condition) { // if ("production" !== process.env.NODE_ENV) { // invariant(false, argument, argument); // } else { // invariant(false); // } // } // // Specifically this does 2 things: // 1. Checks the condition first, preventing an extra function call. // 2. Adds an environment check so that verbose error messages aren't // shipped to production. // The generated code is longer than the original code but will dead // code removal in a minifier will strip that out. var condition = node.arguments[0]; var devInvariant = t.callExpression( node.callee, [t.booleanLiteral(false)].concat(node.arguments.slice(1)) ); devInvariant[SEEN_SYMBOL] = true; var prodInvariant = t.callExpression( node.callee, [t.booleanLiteral(false)] ); prodInvariant[SEEN_SYMBOL] = true; path.replaceWith(t.ifStatement( t.unaryExpression('!', condition), t.blockStatement([ t.ifStatement( DEV_EXPRESSION, t.blockStatement([ t.expressionStatement(devInvariant), ]), t.blockStatement([ t.expressionStatement(prodInvariant), ]) ), ]) )); } else if (path.get('callee').isIdentifier({name: 'warning'})) { // Turns this code: // // warning(condition, argument, argument); // // into this: // // if ("production" !== process.env.NODE_ENV) { // warning(condition, argument, argument); // } // // The goal is to strip out warning calls entirely in production. We // don't need the same optimizations for conditions that we use for // invariant because we don't care about an extra call in __DEV__ node[SEEN_SYMBOL] = true; path.replaceWith(t.ifStatement( DEV_EXPRESSION, t.blockStatement([ t.expressionStatement( node ), ]) )); } }, }, }, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/inline-requires.js000066400000000000000000000065521335022644200257540ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /** * This transform inlines top-level require(...) aliases with to enable lazy * loading of dependencies. It is able to inline both single references and * child property references. * * For instance: * var Foo = require('foo'); * f(Foo); * * Will be transformed into: * f(require('foo')); * * When the assigment expression has a property access, it will be inlined too, * keeping the property. For instance: * var Bar = require('foo').bar; * g(Bar); * * Will be transformed into: * g(require('foo').bar); * * Destructuring also works the same way. For instance: * const {Baz} = require('foo'); * h(Baz); * * Is also successfully inlined into: * g(require('foo').Baz); */ module.exports = function fbjsInlineRequiresTransform(babel) { return { visitor: { Program: { exit(path, state) { var inlineableCalls = {require: true}; if (state.opts && state.opts.inlineableCalls) { state.opts.inlineableCalls.forEach(function(name) { inlineableCalls[name] = true; }); } path.scope.crawl(); path.traverse( {CallExpression: call.bind(null, babel)}, {inlineableCalls: inlineableCalls} ); }, }, }, }; }; function call(babel, path, state) { var declaratorPath = inlineableAlias(path, state) || inlineableMemberAlias(path, state); var declarator = declaratorPath && declaratorPath.node; if (declarator) { var init = declarator.init; var name = declarator.id && declarator.id.name; var binding = declaratorPath.scope.getBinding(name); var constantViolations = binding.constantViolations; if (!constantViolations.length) { deleteLocation(init); babel.traverse(init, { noScope: true, enter: path => deleteLocation(path.node) }); binding.referencePaths.forEach(ref => ref.replaceWith(init)); declaratorPath.remove(); } } } function deleteLocation(node) { delete node.start; delete node.end; delete node.loc; } function inlineableAlias(path, state) { const isValid = ( isInlineableCall(path.node, state) && path.parent.type === 'VariableDeclarator' && path.parent.id.type === 'Identifier' && path.parentPath.parent.type === 'VariableDeclaration' && path.parentPath.parentPath.parent.type === 'Program' ); return isValid ? path.parentPath : null; } function inlineableMemberAlias(path, state) { const isValid = ( isInlineableCall(path.node, state) && path.parent.type === 'MemberExpression' && path.parentPath.parent.type === 'VariableDeclarator' && path.parentPath.parent.id.type === 'Identifier' && path.parentPath.parentPath.parent.type === 'VariableDeclaration' && path.parentPath.parentPath.parentPath.parent.type === 'Program' ); return isValid ? path.parentPath.parentPath : null; } function isInlineableCall(node, state) { return ( node.type === 'CallExpression' && node.callee.type === 'Identifier' && state.inlineableCalls.hasOwnProperty(node.callee.name) && node['arguments'].length === 1 && node['arguments'][0].type === 'StringLiteral' ); } fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/object-assign.js000066400000000000000000000023611335022644200253630ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = function autoImporter(babel) { const t = babel.types; function getAssignIdent(path, file, state) { if (!state.id) { state.id = path.scope.generateUidIdentifier('assign'); path.scope.getProgramParent().push({ id: state.id, init: t.callExpression( t.identifier('require'), [t.stringLiteral('object-assign')] ), }); } return state.id; } return { pre: function() { // map from module to generated identifier this.id = null; }, visitor: { CallExpression: function(path, file) { if (path.get('callee').matchesPattern('Object.assign')) { // generate identifier and require if it hasn't been already var id = getAssignIdent(path, file, this); path.node.callee = id; } }, MemberExpression: function(path, file) { if (path.matchesPattern('Object.assign')) { var id = getAssignIdent(path, file, this); path.replaceWith(id); } }, }, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/plugins/rewrite-modules.js000066400000000000000000000072471335022644200257720ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; /** * Rewrites module string literals according to the `map` and `prefix` options. * This allows other npm packages to be published and used directly without * being a part of the same build. */ function mapModule(state, module) { var moduleMap = state.opts.map || {}; if (moduleMap.hasOwnProperty(module)) { return moduleMap[module]; } // Jest understands the haste module system, so leave modules intact. if (process.env.NODE_ENV !== 'test') { var modulePrefix = state.opts.prefix; if (modulePrefix == null) { modulePrefix = './'; } return modulePrefix + module; } return null; } var jestMethods = [ 'dontMock', 'genMockFromModule', 'mock', 'setMock', 'unmock', ]; function isJestProperty(t, property) { return t.isIdentifier(property) && jestMethods.indexOf(property.name) !== -1; } module.exports = function(babel) { var t = babel.types; /** * Transforms `require('Foo')` and `require.requireActual('Foo')`. */ function transformRequireCall(path, state) { var calleePath = path.get('callee'); if ( !t.isIdentifier(calleePath.node, {name: 'require'}) && !( t.isMemberExpression(calleePath.node) && t.isIdentifier(calleePath.node.object, {name: 'require'}) && t.isIdentifier(calleePath.node.property, {name: 'requireActual'}) ) ) { return; } var args = path.get('arguments'); if (!args.length) { return; } var moduleArg = args[0]; if (moduleArg.node.type === 'StringLiteral') { var module = mapModule(state, moduleArg.node.value); if (module) { moduleArg.replaceWith(t.stringLiteral(module)); } } } /** * Transforms `import type Bar from 'foo'` */ function transformTypeImport(path, state) { var source = path.get('source'); if (source.type === 'StringLiteral') { var module = mapModule(state, source.node.value); if (module) { source.replaceWith(t.stringLiteral(module)); } } } /** * Transforms either individual or chained calls to `jest.dontMock('Foo')`, * `jest.mock('Foo')`, and `jest.genMockFromModule('Foo')`. */ function transformJestHelper(path, state) { var calleePath = path.get('callee'); var args = path.get('arguments'); if (!args.length) { return; } var moduleArg = args[0]; if ( moduleArg.node.type === 'StringLiteral' && calleePath.node && isJestProperty(t, calleePath.node.property) ) { var module = mapModule(state, moduleArg.node.value); if (module) { moduleArg.replaceWith(t.stringLiteral(module)); } } } const jestIdentifier = { Identifier(path) { if (path.node.name === 'jest') { this.isJest = true; } }, }; function transformJestCall(path, state) { let params = {isJest: false}; path.traverse(jestIdentifier, params); if (params.isJest) { transformJestHelper(path, state); } } return { visitor: { CallExpression: { exit(path, state) { if (path.node.seen) { return; } transformRequireCall(path, state); transformJestCall(path, state); path.node.seen = true; }, }, ImportDeclaration: { exit(path, state) { let importKind = path.node.importKind; if (importKind === 'type' || importKind === 'typeof') { transformTypeImport(path, state); } } } }, }; }; fbjs-fbjs-v1.0.0/packages/babel-preset-fbjs/yarn.lock000066400000000000000000002545211335022644200224460ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" dependencies: "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0": version "7.0.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.1.tgz#406658caed0e9686fa4feb5c2f3cefb6161c0f41" dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" "@babel/helpers" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" lodash "^4.17.10" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" "@babel/generator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" dependencies: "@babel/types" "^7.0.0" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" trim-right "^1.0.1" "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: "@babel/types" "^7.0.0" "@babel/helper-builder-react-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0.tgz#fa154cb53eb918cf2a9a7ce928e29eb649c5acdb" dependencies: "@babel/types" "^7.0.0" esutils "^2.0.0" "@babel/helper-call-delegate@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0.tgz#e036956bb33d76e59c07a04a1fff144e9f62ab78" dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-define-map@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0.tgz#a5684dd2adf30f0137cf9b0bde436f8c2db17225" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/types" "^7.0.0" lodash "^4.17.10" "@babel/helper-function-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0.tgz#a68cc8d04420ccc663dd258f9cc41b8261efa2d4" dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" dependencies: "@babel/types" "^7.0.0" "@babel/helper-hoist-variables@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" dependencies: "@babel/types" "^7.0.0" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0.tgz#b01ee7d543e81e8c3fc404b19c9f26acb6e4cf4c" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" lodash "^4.17.10" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" dependencies: "@babel/types" "^7.0.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" "@babel/helper-replace-supers@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0.tgz#b6f21237280e0be54f591f63a464b66627ced707" dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-simple-access@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0.tgz#ff36a27983ae4c27122da2f7f294dced80ecbd08" dependencies: "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-split-export-declaration@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" dependencies: "@babel/types" "^7.0.0" "@babel/helpers@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0.tgz#7213388341eeb07417f44710fd7e1d00acfa6ac0" dependencies: "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" "@babel/parser@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" "@babel/plugin-check-constants@^7.0.0-beta.38": version "7.0.0-beta.38" resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf" "@babel/plugin-proposal-class-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0.tgz#a16b5c076ba6c3d87df64d2480a380e979543731" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" "@babel/plugin-syntax-class-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoping@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" "@babel/plugin-transform-classes@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0.tgz#9e65ca401747dde99e344baea90ab50dccb4c468" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.0.0" "@babel/helper-function-name" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" "@babel/plugin-transform-for-of@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0.tgz#eeda18dc22584e13c3581a68f6be4822bb1d1d81" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-member-expression-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.0.0.tgz#96a265bf61a9ed6f75c39db0c30d41ef7aabf072" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-commonjs@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0.tgz#20b906e5ab130dd8e456b694a94d9575da0fd41f" dependencies: "@babel/helper-module-transforms" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.0.0" "@babel/plugin-transform-object-super@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0.tgz#b8587d511309b3a0e96e9e38169908b3e392041e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/plugin-transform-parameters@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0.tgz#da864efa111816a6df161d492f33de10e74b1949" dependencies: "@babel/helper-call-delegate" "^7.0.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-property-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.0.0.tgz#0b95a91dbd1f0be5b5a99ed86571ef5b5ae77009" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-display-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0.tgz#524379e4eca5363cd10c4446ba163f093da75f3e" dependencies: "@babel/helper-builder-react-jsx" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-template-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/template@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80" dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/types" "^7.0.0" "@babel/traverse@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" "@babel/helper-function-name" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/types" "^7.0.0" debug "^3.1.0" globals "^11.1.0" lodash "^4.17.10" "@babel/types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" dependencies: esutils "^2.0.2" lodash "^4.17.10" to-fast-properties "^2.0.0" abab@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" acorn-globals@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" dependencies: acorn "^4.0.4" acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" dependencies: default-require-extensions "^1.0.0" argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" dependencies: sprintf-js "~1.0.2" arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" dependencies: arr-flatten "^1.0.1" arr-flatten@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" array-differ@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.4, async@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" dependencies: lodash "^4.17.10" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: chalk "^1.1.3" esutils "^2.0.2" js-tokens "^3.0.2" babel-core@^6.0.0, babel-core@^6.26.0: version "6.26.3" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" babel-helpers "^6.24.1" babel-messages "^6.23.0" babel-register "^6.26.0" babel-runtime "^6.26.0" babel-template "^6.26.0" babel-traverse "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" convert-source-map "^1.5.1" debug "^2.6.9" json5 "^0.5.1" lodash "^4.17.4" minimatch "^3.0.4" path-is-absolute "^1.0.1" private "^0.1.8" slash "^1.0.0" source-map "^0.5.7" babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" babel-types "^6.26.0" detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.17.4" source-map "^0.5.7" trim-right "^1.0.1" babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" babel-jest@^17.0.2: version "17.0.2" resolved "http://registry.npmjs.org/babel-jest/-/babel-jest-17.0.2.tgz#8d51e0d03759713c331f108eb0b2eaa4c6efff74" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^2.0.0" babel-preset-jest "^17.0.2" babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: babel-runtime "^6.22.0" babel-plugin-istanbul@^2.0.0: version "2.0.3" resolved "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-2.0.3.tgz#266b304b9109607d60748474394676982f660df4" dependencies: find-up "^1.1.2" istanbul-lib-instrument "^1.1.4" object-assign "^4.1.0" test-exclude "^2.1.1" babel-plugin-jest-hoist@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-17.0.2.tgz#213488ce825990acd4c30f887dca09fffeb45235" babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" babel-preset-jest@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-17.0.2.tgz#141e935debe164aaa0364c220d31ccb2176493b2" dependencies: babel-plugin-jest-hoist "^17.0.2" babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" core-js "^2.5.0" home-or-tmp "^2.0.0" lodash "^4.17.4" mkdirp "^0.5.1" source-map-support "^0.4.15" babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" lodash "^4.17.4" babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" babel-runtime "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" debug "^2.6.8" globals "^9.18.0" invariant "^2.2.2" lodash "^4.17.4" babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" lodash "^4.17.4" to-fast-properties "^1.0.3" babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" dependencies: tweetnacl "^0.14.3" brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" dependencies: expand-range "^1.8.1" preserve "^0.2.0" repeat-element "^1.1.2" browser-resolve@^1.11.2: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" dependencies: resolve "1.1.7" bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" dependencies: node-int64 "^0.4.0" builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" cardinal@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-2.1.1.tgz#7cc1055d822d212954d07b085dea251cc7bc5505" dependencies: ansicolors "~0.3.2" redeyed "~2.1.0" caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" supports-color "^2.0.0" chalk@^2.0.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" ci-info@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.5.1.tgz#17e8eb5de6f8b2b6038f0cbb714d410bfa9f3030" cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" dependencies: colors "1.0.3" cli-usage@^0.1.1: version "0.1.8" resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.8.tgz#16479361f3a895a81062d02d9634827c713aaaf8" dependencies: marked "^0.5.0" marked-terminal "^3.0.0" cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrap-ansi "^2.0.0" co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: color-name "1.1.3" color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" combined-stream@1.0.6, combined-stream@~1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" dependencies: delayed-stream "~1.0.0" commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" content-type-parser@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" convert-source-map@^1.1.0, convert-source-map@^1.5.1: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" dependencies: safe-buffer "~5.1.1" core-js@^2.4.0, core-js@^2.5.0: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" "cssstyle@>= 0.2.37 < 0.3.0": version "0.2.37" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" dependencies: cssom "0.3.x" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" debug@^3.1.0: version "3.2.5" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407" dependencies: ms "^2.1.1" decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" default-require-extensions@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" dependencies: strip-bom "^2.0.0" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" dependencies: repeating "^2.0.0" diff@^3.0.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" dependencies: prr "~1.0.1" error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" dependencies: is-arrayish "^0.2.1" escape-string-regexp@^1.0.2, 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" escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" dependencies: esprima "^2.7.1" estraverse "^1.9.1" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: source-map "~0.2.0" escodegen@^1.6.1: version "1.11.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" dependencies: esprima "^3.1.3" estraverse "^4.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: source-map "~0.6.1" esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" exec-sh@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" dependencies: merge "^1.2.0" expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" dependencies: is-posix-bracket "^0.1.0" expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" dependencies: is-extglob "^1.0.0" extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" fb-watchman@^1.8.0, fb-watchman@^1.9.0: version "1.9.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" dependencies: bser "1.0.2" filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" fileset@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" dependencies: glob "^7.0.3" minimatch "^3.0.3" fill-range@^2.1.0: version "2.2.4" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" dependencies: is-number "^2.1.0" isobject "^2.0.0" randomatic "^3.0.0" repeat-element "^1.1.2" repeat-string "^1.5.2" find-up@^1.0.0, find-up@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" for-own@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: for-in "^1.0.1" forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" form-data@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" dependencies: asynckit "^0.4.0" combined-stream "1.0.6" mime-types "^2.1.12" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" dependencies: glob-parent "^2.0.0" is-glob "^2.0.0" glob-parent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" dependencies: is-glob "^2.0.0" glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" dependencies: inflight "^1.0.4" inherits "2" minimatch "2 || 3" once "^1.3.0" path-is-absolute "^1.0.0" glob@^7.0.3, glob@^7.0.5: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" globals@^11.1.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" growly@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" handlebars@^4.0.1, handlebars@^4.0.3: version "4.0.12" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" dependencies: async "^2.5.0" optimist "^0.6.1" source-map "^0.6.1" optionalDependencies: uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" har-validator@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" dependencies: ajv "^5.3.0" har-schema "^2.0.0" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" html-encoding-sniffer@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" dependencies: whatwg-encoding "^1.0.1" http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" iconv-lite@0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: safer-buffer ">= 2.1.2 < 3" inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" dependencies: once "^1.3.0" wrappy "1" inherits@2: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" dependencies: builtin-modules "^1.0.0" is-ci@^1.0.9: version "1.2.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" dependencies: ci-info "^1.5.0" is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" dependencies: is-primitive "^2.0.0" is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" dependencies: number-is-nan "^1.0.0" is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" dependencies: kind-of "^3.0.2" is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" isarray@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" dependencies: isarray "1.0.0" isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.0.0-aplha.10: version "1.3.7" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" dependencies: async "^2.1.4" fileset "^2.0.2" istanbul-lib-coverage "^1.2.1" istanbul-lib-hook "^1.2.2" istanbul-lib-instrument "^1.10.2" istanbul-lib-report "^1.1.5" istanbul-lib-source-maps "^1.2.6" istanbul-reports "^1.5.1" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" istanbul-lib-hook@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" dependencies: append-transform "^0.4.0" istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4, istanbul-lib-instrument@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" babylon "^6.18.0" istanbul-lib-coverage "^1.2.1" semver "^5.3.0" istanbul-lib-report@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" dependencies: istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" path-parse "^1.0.5" supports-color "^3.1.2" istanbul-lib-source-maps@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" dependencies: debug "^3.1.0" istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" rimraf "^2.6.1" source-map "^0.5.3" istanbul-reports@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" dependencies: handlebars "^4.0.3" istanbul@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" dependencies: abbrev "1.0.x" async "1.x" escodegen "1.8.x" esprima "2.7.x" glob "^5.0.15" handlebars "^4.0.1" js-yaml "3.x" mkdirp "0.5.x" nopt "3.x" once "1.x" resolve "1.1.x" supports-color "^3.1.0" which "^1.1.1" wordwrap "^1.0.0" jest-changed-files@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" jest-cli@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-cli/-/jest-cli-17.0.3.tgz#700b8c02a9ea0ec9eab0cd5a9fd42d8a858ce146" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" chalk "^1.1.1" graceful-fs "^4.1.6" is-ci "^1.0.9" istanbul-api "^1.0.0-aplha.10" istanbul-lib-coverage "^1.0.0" istanbul-lib-instrument "^1.1.1" jest-changed-files "^17.0.2" jest-config "^17.0.3" jest-environment-jsdom "^17.0.2" jest-file-exists "^17.0.0" jest-haste-map "^17.0.3" jest-jasmine2 "^17.0.3" jest-mock "^17.0.2" jest-resolve "^17.0.3" jest-resolve-dependencies "^17.0.3" jest-runtime "^17.0.3" jest-snapshot "^17.0.3" jest-util "^17.0.2" json-stable-stringify "^1.0.0" node-notifier "^4.6.1" sane "~1.4.1" strip-ansi "^3.0.1" throat "^3.0.0" which "^1.1.1" worker-farm "^1.3.1" yargs "^6.3.0" jest-config@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-config/-/jest-config-17.0.3.tgz#b6ed75d90d090b731fd894231904cadb7d5a5df2" dependencies: chalk "^1.1.1" istanbul "^0.4.5" jest-environment-jsdom "^17.0.2" jest-environment-node "^17.0.2" jest-jasmine2 "^17.0.3" jest-mock "^17.0.2" jest-resolve "^17.0.3" jest-util "^17.0.2" json-stable-stringify "^1.0.0" jest-diff@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-diff/-/jest-diff-17.0.3.tgz#8fb31efab3b314d7b61b7b66b0bdea617ef1c02f" dependencies: chalk "^1.1.3" diff "^3.0.0" jest-matcher-utils "^17.0.3" pretty-format "~4.2.1" jest-environment-jsdom@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-17.0.2.tgz#a3098dc29806d40802c52b62b848ab6aa00fdba0" dependencies: jest-mock "^17.0.2" jest-util "^17.0.2" jsdom "^9.8.1" jest-environment-node@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-17.0.2.tgz#aff6133f4ca2faddcc5b0ce7d25cec83e16d8463" dependencies: jest-mock "^17.0.2" jest-util "^17.0.2" jest-file-exists@^17.0.0: version "17.0.0" resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" jest-haste-map@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-haste-map/-/jest-haste-map-17.0.3.tgz#5232783e70577217b6b17d2a1c1766637a1d2fbd" dependencies: fb-watchman "^1.9.0" graceful-fs "^4.1.6" multimatch "^2.1.0" sane "~1.4.1" worker-farm "^1.3.1" jest-jasmine2@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-17.0.3.tgz#d4336b89f3ad288269a1c8e2bfc180dcf89c6ad1" dependencies: graceful-fs "^4.1.6" jest-matchers "^17.0.3" jest-snapshot "^17.0.3" jest-util "^17.0.2" jest-matcher-utils@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-17.0.3.tgz#f108e49b956e152c6626dcc0aba864f59ab7b0d3" dependencies: chalk "^1.1.3" pretty-format "~4.2.1" jest-matchers@^17.0.3: version "17.0.3" resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-17.0.3.tgz#88b95348c919343db86d08f12354a8650ae7eddf" dependencies: jest-diff "^17.0.3" jest-matcher-utils "^17.0.3" jest-util "^17.0.2" jest-mock@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-17.0.2.tgz#3dfe9221afd9aa61b3d9992840813a358bb2f429" jest-resolve-dependencies@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-17.0.3.tgz#bbd37f4643704b97a980927212f3ab12b06e8894" dependencies: jest-file-exists "^17.0.0" jest-resolve "^17.0.3" jest-resolve@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-resolve/-/jest-resolve-17.0.3.tgz#7692a79de2831874375e9d664bc782c29e4da262" dependencies: browser-resolve "^1.11.2" jest-file-exists "^17.0.0" jest-haste-map "^17.0.3" resolve "^1.1.6" jest-runtime@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-runtime/-/jest-runtime-17.0.3.tgz#eff4055fe8c3e17c95ed1aaaf5f719c420b86b1f" dependencies: babel-core "^6.0.0" babel-jest "^17.0.2" babel-plugin-istanbul "^2.0.0" chalk "^1.1.3" graceful-fs "^4.1.6" jest-config "^17.0.3" jest-file-exists "^17.0.0" jest-haste-map "^17.0.3" jest-mock "^17.0.2" jest-resolve "^17.0.3" jest-snapshot "^17.0.3" jest-util "^17.0.2" json-stable-stringify "^1.0.0" multimatch "^2.1.0" yargs "^6.3.0" jest-snapshot@^17.0.3: version "17.0.3" resolved "http://registry.npmjs.org/jest-snapshot/-/jest-snapshot-17.0.3.tgz#c8199db4ccbd5515cfecc8e800ab076bdda7abc0" dependencies: jest-diff "^17.0.3" jest-file-exists "^17.0.0" jest-matcher-utils "^17.0.3" jest-util "^17.0.2" natural-compare "^1.4.0" pretty-format "~4.2.1" jest-util@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-17.0.2.tgz#9fd9da8091e9904fb976da7e4d8912ca26968638" dependencies: chalk "^1.1.1" diff "^3.0.0" graceful-fs "^4.1.6" jest-file-exists "^17.0.0" jest-mock "^17.0.2" mkdirp "^0.5.1" "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@3.x, js-yaml@^3.7.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: argparse "^1.0.7" esprima "^4.0.0" jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsdom@^9.8.1: version "9.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" dependencies: abab "^1.0.3" acorn "^4.0.4" acorn-globals "^3.1.0" array-equal "^1.0.0" content-type-parser "^1.0.1" cssom ">= 0.3.2 < 0.4.0" cssstyle ">= 0.2.37 < 0.3.0" escodegen "^1.6.1" html-encoding-sniffer "^1.0.1" nwmatcher ">= 1.3.9 < 2.0.0" parse5 "^1.5.1" request "^2.79.0" sax "^1.2.1" symbol-tree "^3.2.1" tough-cookie "^2.3.2" webidl-conversions "^4.0.0" whatwg-encoding "^1.0.1" whatwg-url "^4.3.0" xml-name-validator "^2.0.1" jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" json-stable-stringify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: jsonify "~0.0.0" json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" dependencies: assert-plus "1.0.0" extsprintf "1.3.0" json-schema "0.2.3" verror "1.10.0" kind-of@^3.0.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: is-buffer "^1.1.5" kind-of@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" dependencies: invert-kv "^1.0.0" levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" pify "^2.0.0" pinkie-promise "^2.0.0" strip-bom "^2.0.0" lodash._arraycopy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" lodash._arrayeach@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" lodash._baseassign@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" dependencies: lodash._basecopy "^3.0.0" lodash.keys "^3.0.0" lodash._baseclone@^3.0.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" dependencies: lodash._arraycopy "^3.0.0" lodash._arrayeach "^3.0.0" lodash._baseassign "^3.0.0" lodash._basefor "^3.0.0" lodash.isarray "^3.0.0" lodash.keys "^3.0.0" lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" lodash._basefor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" lodash.clonedeep@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" dependencies: lodash._baseclone "^3.0.0" lodash._bindcallback "^3.0.0" lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" dependencies: lodash._getnative "^3.0.0" lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" lodash@^4.17.10, lodash@^4.17.4: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" dependencies: js-tokens "^3.0.0 || ^4.0.0" makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" dependencies: tmpl "1.0.x" marked-terminal@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.1.1.tgz#1e726816ddc4552a83393228ff0952b6cd4e5e04" dependencies: cardinal "^2.1.1" chalk "^2.4.1" cli-table "^0.3.1" lodash.assign "^4.2.0" node-emoji "^1.4.1" marked@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.0.tgz#9e590bad31584a48ff405b33ab1c0dd25172288e" math-random@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" merge@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: arr-diff "^2.0.0" array-unique "^0.2.1" braces "^1.8.2" expand-brackets "^0.1.4" extglob "^0.3.1" filename-regex "^2.0.0" is-extglob "^1.0.0" is-glob "^2.0.1" kind-of "^3.0.2" normalize-path "^2.0.1" object.omit "^2.0.0" parse-glob "^3.0.4" regex-cache "^0.4.2" mime-db@~1.36.0: version "1.36.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.20" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" dependencies: mime-db "~1.36.0" "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" minimist@0.0.8: version "0.0.8" resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" minimist@^1.1.1: version "1.2.0" resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" minimist@~0.0.1: version "0.0.10" resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" mkdirp@0.5.x, mkdirp@^0.5.1: version "0.5.1" resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" dependencies: array-differ "^1.0.0" array-union "^1.0.1" arrify "^1.0.0" minimatch "^3.0.0" natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" node-emoji@^1.4.1: version "1.8.1" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.8.1.tgz#6eec6bfb07421e2148c75c6bba72421f8530a826" dependencies: lodash.toarray "^4.4.0" node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" node-notifier@^4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" dependencies: cli-usage "^0.1.1" growly "^1.2.0" lodash.clonedeep "^3.0.0" minimist "^1.1.1" semver "^5.1.0" shellwords "^0.1.0" which "^1.0.5" nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: abbrev "1" normalize-package-data@^2.3.2: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" "nwmatcher@>= 1.3.9 < 2.0.0": version "1.4.4" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" dependencies: for-own "^0.1.4" is-extendable "^0.1.1" once@1.x, once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: minimist "~0.0.1" wordwrap "~0.0.2" optionator@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" wordwrap "~1.0.0" os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" os-locale@^1.4.0: version "1.4.0" resolved "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" dependencies: lcid "^1.0.0" os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" dependencies: glob-base "^0.3.0" is-dotfile "^1.0.0" is-extglob "^1.0.0" is-glob "^2.0.0" parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" dependencies: error-ex "^1.2.0" parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" dependencies: pinkie-promise "^2.0.0" path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" path-parse@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" dependencies: graceful-fs "^4.1.2" pify "^2.0.0" pinkie-promise "^2.0.0" performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" pretty-format@~4.2.1: version "4.2.3" resolved "http://registry.npmjs.org/pretty-format/-/pretty-format-4.2.3.tgz#8894c2ac81419cf801629d8f66320a25380d8b05" private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" psl@^1.1.24: version "1.1.29" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" randomatic@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" dependencies: is-number "^4.0.0" kind-of "^6.0.0" math-random "^1.0.1" read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" dependencies: find-up "^1.0.0" read-pkg "^1.0.0" read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" path-type "^1.0.0" redeyed@~2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-2.1.1.tgz#8984b5815d99cb220469c99eeeffe38913e6cc0b" dependencies: esprima "~4.0.0" regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" repeat-element@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" repeat-string@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" dependencies: is-finite "^1.0.0" request@^2.79.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" caseless "~0.12.0" combined-stream "~1.0.6" extend "~3.0.2" forever-agent "~0.6.1" form-data "~2.3.2" har-validator "~5.1.0" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.19" oauth-sign "~0.9.0" performance-now "^2.1.0" qs "~6.5.2" safe-buffer "^5.1.2" tough-cookie "~2.4.3" tunnel-agent "^0.6.0" uuid "^3.3.2" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" resolve@1.1.7, resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" resolve@^1.1.6, resolve@^1.3.2: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" sane@~1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" dependencies: exec-sh "^0.2.0" fb-watchman "^1.8.0" minimatch "^3.0.2" minimist "^1.1.1" walker "~1.0.5" watch "~0.10.0" sax@^1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" "semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" shellwords@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: source-map "^0.5.6" source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" dependencies: amdefine ">=0.0.4" spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: version "1.14.2" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" dashdash "^1.12.0" getpass "^0.1.1" safer-buffer "^2.0.2" optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" jsbn "~0.1.0" tweetnacl "~0.14.0" string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" supports-color@^3.1.0, supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: has-flag "^3.0.0" symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" test-exclude@^2.1.1: version "2.1.3" resolved "http://registry.npmjs.org/test-exclude/-/test-exclude-2.1.3.tgz#a8d8968e1da83266f9864f2852c55e220f06434a" dependencies: arrify "^1.0.1" micromatch "^2.3.11" object-assign "^4.1.0" read-pkg-up "^1.0.1" require-main-filename "^1.0.1" throat@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" tough-cookie@^2.3.2, tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" dependencies: psl "^1.1.24" punycode "^1.4.1" tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" dependencies: prelude-ls "~1.1.2" uglify-js@^3.1.4: version "3.4.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" dependencies: commander "~2.17.1" source-map "~0.6.1" uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" extsprintf "^1.2.0" walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" dependencies: makeerror "1.0.x" watch@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" webidl-conversions@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" whatwg-encoding@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.4.tgz#63fb016b7435b795d9025632c086a5209dbd2621" dependencies: iconv-lite "0.4.23" whatwg-url@^4.3.0: version "4.8.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" which@^1.0.5, which@^1.1.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: isexe "^2.0.0" wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" worker-farm@^1.3.1: version "1.6.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" dependencies: errno "~0.1.7" wrap-ansi@^2.0.0: version "2.1.0" resolved "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" dependencies: camelcase "^3.0.0" yargs@^6.3.0: version "6.6.0" resolved "http://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: camelcase "^3.0.0" cliui "^3.2.0" decamelize "^1.1.1" get-caller-file "^1.0.1" os-locale "^1.4.0" read-pkg-up "^1.0.1" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" yargs-parser "^4.2.0" fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/000077500000000000000000000000001335022644200231665ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/LICENSE000066400000000000000000000020701335022644200241720ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/README.md000066400000000000000000000016041335022644200244460ustar00rootroot00000000000000# eslint-config-fbjs-opensource This configuration is a new ideal setup based on Facebook's internal configurations combined with the configurations that our open source projects are trending towards in a more modern code base. In particular, this is strongly based on Nuclide's ESLint rules. It has far more rules enabled than our other configuration and enforces a stricter style. ## Usage ### Install: #### `npm` ```sh npm install --save-dev eslint eslint-config-fbjs-opensource ``` #### `yarn` ```sh yarn add --dev eslint eslint-config-fbjs-opensource ``` ### Configure Add `extends: 'fbjs-opensource'` to your local `.eslintrc` #### Warning Configuration This package also comes with a *warning* version of the config. This can be used to make all rules that would normally be reported as errors to be reported as warnings. Use `extends: 'fbjs-opensource/warning'` in your `.eslintrc` fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/index.js000066400000000000000000000303131335022644200246330ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // This is the ideal state of our ESLint config that we'll use for open source // projects. It doesn't reflect the current state of our internal code base as // it is, but as it would be if it were created today. const globals = require('fbjs-eslint-utils/globals'); const maxLenIgnorePattern = require('fbjs-eslint-utils/shared').maxLenIgnorePattern; module.exports = { parser: 'babel-eslint', parserOptions: { ecmaVersion: 7, sourceType: 'module', ecmaFeatures: { globalReturn: true, jsx: true, experimentalObjectRestSpread: true, }, }, env: { atomtest: true, browser: true, es6: true, jasmine: true, jest: true, node: true, }, globals: Object.assign({ atom: false, document: false, window: false, HTMLElement: false, WebSocket: false, }, globals), rules: { // Possible Errors (http://eslint.org/docs/rules/#possible-errors) 'no-cond-assign': 1, 'no-console': 1, 'no-constant-condition': [1, {checkLoops: false}], 'no-control-regex': 1, 'no-debugger': 2, 'no-dupe-args': 2, 'no-dupe-keys': 2, 'no-duplicate-case': 1, 'no-empty': [1, {allowEmptyCatch: true}], 'no-empty-character-class': 1, 'no-ex-assign': 1, 'no-extra-boolean-cast': 1, 'no-extra-parens': 0, 'no-extra-semi': 1, 'no-func-assign': 2, 'no-inner-declarations': 1, 'no-invalid-regexp': 1, 'no-irregular-whitespace': 1, 'no-obj-calls': 2, 'no-prototype-builtins': 0, 'no-regex-spaces': 1, 'no-sparse-arrays': 2, 'no-template-curly-in-string': 0, 'no-unexpected-multiline': 1, 'no-unreachable': 2, 'no-unsafe-finally': 1, 'no-unsafe-negation': 2, 'use-isnan': 2, 'valid-jsdoc': 0, 'valid-typeof': 2, // Best Practices (http://eslint.org/docs/rules/#best-practices) 'accessor-pairs': [1, {setWithoutGet: true}], 'array-callback-return': 1, 'block-scoped-var': 0, 'class-methods-use-this': 0, 'complexity': 0, 'consistent-return': 1, 'curly': 1, 'default-case': 0, 'dot-location': [1, 'property'], 'dot-notation': 1, 'eqeqeq': [1, 'allow-null'], 'guard-for-in': 0, 'no-alert': 1, 'no-await-in-loop': 1, 'no-caller': 2, 'no-case-declarations': 1, 'no-div-regex': 1, 'no-else-return': 0, 'no-empty-function': 0, 'no-empty-pattern': 1, 'no-eq-null': 0, 'no-eval': 2, 'no-extend-native': 1, 'no-extra-bind': 1, 'no-extra-label': 1, 'no-fallthrough': 1, 'no-floating-decimal': 2, 'no-global-assign': [2, {exceptions: ['Map', 'Set']}], 'no-implicit-coercion': 0, 'no-implicit-globals': 0, 'no-implied-eval': 2, 'no-invalid-this': 0, 'no-iterator': 1, 'no-labels': [2, {allowLoop: true, allowSwitch: true}], 'no-lone-blocks': 1, 'no-loop-func': 0, 'no-magic-numbers': 0, 'no-multi-spaces': [1, {exceptions: {Property: true}}], 'no-multi-str': 2, 'no-new-func': 2, 'no-new-wrappers': 1, 'no-new': 1, 'no-octal': 1, 'no-octal-escape': 1, 'no-param-reassign': 1, 'no-proto': 2, 'no-redeclare': [1, {builtinGlobals: true}], 'no-restricted-properties': 0, 'no-return-assign': 1, 'no-return-await': 0, 'no-script-url': 2, 'no-self-assign': 1, 'no-self-compare': 1, 'no-sequences': 1, 'no-throw-literal': 1, 'no-unmodified-loop-condition': 0, 'no-unused-expressions': 0, // allowShortCircuit? 'no-unused-labels': 1, 'no-useless-call': 1, 'no-useless-concat': 1, 'no-useless-escape': 1, 'no-useless-return': 1, 'no-void': 1, 'no-warning-comments': 0, 'no-with': 1, 'radix': 1, 'require-await': 1, 'vars-on-top': 0, 'wrap-iife': [1, 'inside'], 'yoda': 1, // Strict Mode (http://eslint.org/docs/rules/#strict-mode) 'strict': 1, // Variables (http://eslint.org/docs/rules/#variables) 'init-declarations': 0, 'no-catch-shadow': 2, 'no-delete-var': 2, 'no-label-var': 1, 'no-restricted-globals': 0, 'no-shadow-restricted-names': 1, 'no-shadow': 1, 'no-undef-init': 0, 'no-undef': 2, 'no-undefined': 0, 'no-unused-vars': [1, {args: 'none'}], 'no-use-before-define': 0, // Node.js and CommonJS (http://eslint.org/docs/rules/#nodejs-and-commonjs) 'callback-return': 0, 'global-require': 0, 'handle-callback-err': 1, 'no-mixed-requires': 0, 'no-new-require': 1, 'no-path-concat': 1, 'no-process-env': 0, 'no-process-exit': 0, 'no-restricted-modules': 0, 'no-sync': 0, // Stylistic Issues (http://eslint.org/docs/rules/#stylistic-issues) 'array-bracket-spacing': 1, 'block-spacing': 1, 'brace-style': [1, '1tbs', {allowSingleLine: true}], 'camelcase': [1, {properties: 'always'}], 'capitalized-comments': 0, 'comma-dangle': [1, {arrays: 'always-multiline', objects: 'always-multiline', imports: 'always-multiline', exports: 'always-multiline', functions: 'always-multiline'}], 'comma-spacing': 1, 'comma-style': 1, 'computed-property-spacing': 1, 'consistent-this': 0, 'eol-last': 1, 'func-call-spacing': 1, 'func-name-matching': 0, 'func-names': 0, 'func-style': 0, 'id-blacklist': 0, 'id-length': 0, 'id-match': 0, 'indent': [1, 2, {SwitchCase: 1}], 'jsx-quotes': [1, 'prefer-double'], 'key-spacing': [1, {beforeColon: false, afterColon: true}], 'keyword-spacing': 1, 'line-comment-position': 0, 'linebreak-style': 1, 'lines-around-comment': 0, 'lines-around-directive': 0, 'max-depth': 0, 'max-len': [1, 120, {tabWidth: 2, ignoreUrls: true, ignorePattern: maxLenIgnorePattern}], 'max-lines': 0, 'max-nested-callbacks': 0, 'max-params': 0, 'max-statements': 0, 'max-statements-per-line': 0, 'multiline-ternary': 0, 'new-cap': 0, 'new-parens': 2, 'newline-after-var': 0, 'newline-before-return': 0, 'newline-per-chained-call': 0, 'no-array-constructor': 1, 'no-bitwise': 1, 'no-continue': 0, 'no-inline-comments': 0, 'no-lonely-if': 0, 'no-mixed-operators': 0, 'no-mixed-spaces-and-tabs': 2, 'no-multiple-empty-lines': [1, {max: 2, maxBOF: 0, maxEOF: 1}], 'no-negated-condition': 0, 'no-nested-ternary': 0, 'no-new-object': 1, 'no-plusplus': 0, 'no-restricted-syntax': 0, 'no-tabs': 2, 'no-ternary': 0, 'no-trailing-spaces': 1, 'no-underscore-dangle': 0, 'no-unneeded-ternary': 1, 'no-whitespace-before-property': 1, 'object-curly-newline': 0, 'object-curly-spacing': 1, 'object-property-newline': 0, 'one-var-declaration-per-line': 0, 'one-var': [1, {initialized: 'never'}], 'operator-assignment': 1, 'operator-linebreak': 0, 'padded-blocks': 0, 'quote-props': [1, 'consistent-as-needed'], 'quotes': [1, 'single', 'avoid-escape'], 'require-jsdoc': 0, 'semi-spacing': 1, 'semi': 1, 'sort-keys': 0, 'sort-vars': 0, 'space-before-blocks': 1, 'space-before-function-paren': [1, {anonymous: 'never', named: 'never', asyncArrow: 'always'}], 'space-in-parens': [1, 'never'], 'space-infix-ops': [1, {int32Hint: true}], 'space-unary-ops': [1, {words: true, nonwords: false}], 'spaced-comment': [1, 'always', {line: {exceptions: ['-', 'eslint', 'global']}, block: {balanced: true}}], 'unicode-bom': [1, 'never'], 'wrap-regex': 0, // ECMAScript 6 (http://eslint.org/docs/rules/#ecmascript-6) 'arrow-body-style': 0, 'arrow-parens': [1, 'as-needed'], 'arrow-spacing': 1, 'constructor-super': 2, 'generator-star-spacing': 1, 'no-class-assign': 1, 'no-confusing-arrow': [1, {allowParens: true}], 'no-const-assign': 2, 'no-dupe-class-members': 2, 'no-duplicate-imports': 1, 'no-new-symbol': 1, 'no-restricted-imports': 0, 'no-this-before-super': 2, 'no-useless-computed-key': 1, 'no-useless-constructor': 1, 'no-var': 1, 'no-useless-rename': 1, 'object-shorthand': 1, 'prefer-arrow-callback': [1, {allowNamedFunctions: true}], 'prefer-const': 1, 'prefer-numeric-literals': 0, 'prefer-rest-params': 1, 'prefer-spread': 1, 'prefer-template': 0, 'require-yield': 0, 'rest-spread-spacing': 1, 'sort-imports': 0, 'symbol-description': 1, 'template-curly-spacing': 1, 'yield-star-spacing': 1, // Babel (https://github.com/babel/eslint-plugin-babel) 'babel/new-cap': 0, 'babel/object-curly-spacing': 0, 'babel/no-invalid-this': 0, 'babel/no-await-in-loop': 0, // deprecated; now using 'no-await-in-loop' from eslint core // flowtype (https://github.com/gajus/eslint-plugin-flowtype) 'flowtype/boolean-style': 1, 'flowtype/define-flow-type': 1, 'flowtype/delimiter-dangle': [1, 'always-multiline'], 'flowtype/generic-spacing': 1, 'flowtype/no-dupe-keys': 1, 'flowtype/no-primitive-constructor-types': 1, 'flowtype/no-weak-types': 1, 'flowtype/object-type-delimiter': 1, 'flowtype/require-parameter-type': 0, 'flowtype/require-return-type': 0, 'flowtype/require-valid-file-annotation': 0, 'flowtype/require-variable-type': 0, 'flowtype/semi': 1, 'flowtype/sort-keys': 0, 'flowtype/space-after-type-colon': [1, 'always'], 'flowtype/space-before-generic-bracket': 1, 'flowtype/space-before-type-colon': 1, 'flowtype/type-id-match': 0, 'flowtype/union-intersection-spacing': 1, 'flowtype/use-flow-type': 1, 'flowtype/valid-syntax': 0, // Jasmine (https://github.com/tlvince/eslint-plugin-jasmine) 'jasmine/missing-expect': 0, 'jasmine/named-spy': 0, 'jasmine/no-assign-spyon': 0, 'jasmine/no-disabled-tests': 1, 'jasmine/no-focused-tests': 2, 'jasmine/no-spec-dupes': [1, 'branch'], 'jasmine/no-suite-callback-args': 0, 'jasmine/no-suite-dupes': [1, 'branch'], 'jasmine/no-unsafe-spy': 1, 'jasmine/no-global-setup': 1, 'jasmine/valid-expect': 0, // prefer-object-spread (https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread) 'prefer-object-spread/prefer-object-spread': 1, // React (https://github.com/yannickcr/eslint-plugin-react) 'react/display-name': 0, 'react/forbid-component-props': 0, 'react/forbid-prop-types': 0, 'react/no-children-prop': 0, 'react/no-danger': 0, 'react/no-danger-with-children': 0, 'react/no-deprecated': 1, 'react/no-did-mount-set-state': 0, 'react/no-did-update-set-state': 0, 'react/no-direct-mutation-state': 1, 'react/no-find-dom-node': 0, 'react/no-is-mounted': 1, 'react/no-multi-comp': 0, 'react/no-render-return-value': 0, 'react/no-set-state': 0, 'react/no-string-refs': 0, 'react/no-unescaped-entities': 0, 'react/no-unknown-property': 1, 'react/no-unused-prop-types': 0, 'react/prefer-es6-class': 0, 'react/prefer-stateless-function': 0, 'react/prop-types': 1, 'react/react-in-jsx-scope': 1, 'react/require-optimization': 0, 'react/require-render-return': 0, 'react/self-closing-comp': 1, 'react/sort-comp': 0, 'react/sort-prop-types': 0, 'react/style-prop-object': 0, 'react/jsx-boolean-value': 0, 'react/jsx-closing-bracket-location': [1, {selfClosing: 'tag-aligned', nonEmpty: 'after-props'}], 'react/jsx-curly-spacing': [1, 'never'], 'react/jsx-equals-spacing': [1, 'never'], 'react/jsx-filename-extension': 0, 'react/jsx-first-prop-new-line': 0, 'react/jsx-handler-names': 0, 'react/jsx-indent': [1, 2], 'react/jsx-indent-props': [1, 2], 'react/jsx-key': 1, 'react/jsx-max-props-per-line': 0, 'react/jsx-no-bind': 0, 'react/jsx-no-comment-textnodes': 1, 'react/jsx-no-duplicate-props': 2, 'react/jsx-no-literals': 0, 'react/jsx-no-target-blank': 0, 'react/jsx-no-undef': 2, 'react/jsx-pascal-case': 0, 'react/jsx-sort-props': 0, 'react/jsx-tag-spacing': [1, {beforeSelfClosing: 'always'}], 'react/jsx-uses-react': 1, 'react/jsx-uses-vars': 1, 'react/jsx-wrap-multilines': 1, }, plugins: [ 'babel', 'flowtype', 'jasmine', 'prefer-object-spread', 'react', ], }; fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/package.json000066400000000000000000000011421335022644200254520ustar00rootroot00000000000000{ "name": "eslint-config-fbjs-opensource", "version": "1.0.0", "description": "", "author": "", "repository": "facebook/fbjs", "main": "index.js", "license": "MIT", "files": [ "LICENCE", "README.md", "index.js", "warning.js" ], "dependencies": { "babel-eslint": "^7.2.3", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-jasmine": "^2.2.0", "eslint-plugin-prefer-object-spread": "^1.1.0", "eslint-plugin-react": "^7.1.0", "fbjs-eslint-utils": "^1.0.0" }, "peerDependencies": { "eslint": "^4.2.0" } } fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/warning.js000066400000000000000000000005041335022644200251700ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; let changeErrorLevel = require('fbjs-eslint-utils/change-error-level'); module.exports = changeErrorLevel(require('.'), 1); fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs-opensource/yarn.lock000066400000000000000000000227011335022644200250130ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" array-includes@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" dependencies: define-properties "^1.1.2" es-abstract "^1.7.0" babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: chalk "^1.1.3" esutils "^2.0.2" js-tokens "^3.0.2" babel-eslint@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" dependencies: babel-code-frame "^6.22.0" babel-traverse "^6.23.1" babel-types "^6.23.0" babylon "^6.17.0" babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: babel-runtime "^6.22.0" babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" babel-traverse@^6.23.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" babel-runtime "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" debug "^2.6.8" globals "^9.18.0" invariant "^2.2.2" lodash "^4.17.4" babel-types@^6.23.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" lodash "^4.17.4" to-fast-properties "^1.0.3" babylon@^6.17.0, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" chalk@^1.1.3: version "1.1.3" resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" supports-color "^2.0.0" core-js@^2.4.0: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" dependencies: object-keys "^1.0.12" doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: esutils "^2.0.2" es-abstract@^1.7.0: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" has "^1.0.1" is-callable "^1.1.3" is-regex "^1.0.4" es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" dependencies: is-callable "^1.1.1" is-date-object "^1.0.1" is-symbol "^1.0.1" escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" eslint-plugin-babel@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.1.2.tgz#79202a0e35757dd92780919b2336f1fa2fe53c1e" eslint-plugin-flowtype@^2.35.0: version "2.50.0" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da" dependencies: lodash "^4.17.10" eslint-plugin-jasmine@^2.2.0: version "2.10.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jasmine/-/eslint-plugin-jasmine-2.10.1.tgz#5733b709e751f4bc40e31e1c16989bd2cdfbec97" eslint-plugin-prefer-object-spread@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-object-spread/-/eslint-plugin-prefer-object-spread-1.2.1.tgz#27fb91853690cceb3ae6101d9c8aecc6a67a402c" eslint-plugin-react@^7.1.0: version "7.11.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" dependencies: array-includes "^3.0.3" doctrine "^2.1.0" has "^1.0.3" jsx-ast-utils "^2.0.1" prop-types "^15.6.2" esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" fbjs-eslint-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fbjs-eslint-utils/-/fbjs-eslint-utils-1.0.0.tgz#e6d09d14e9360b30e0840d1609f769b70f56c3ea" function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" dependencies: function-bind "^1.1.1" invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: loose-envify "^1.0.0" is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" dependencies: has "^1.0.1" is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" "js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" jsx-ast-utils@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: array-includes "^3.0.3" lodash@^4.17.10, lodash@^4.17.4: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" loose-envify@^1.0.0, loose-envify@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" dependencies: js-tokens "^3.0.0 || ^4.0.0" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" prop-types@^15.6.2: version "15.6.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: loose-envify "^1.3.1" object-assign "^4.1.1" regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/000077500000000000000000000000001335022644200210065ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/CHANGELOG.md000066400000000000000000000013661335022644200226250ustar00rootroot00000000000000## [2.0.1] - 2017-11-26 ### Changed - Updated peer dependency of `eslint-plugin-relay` to allow a range. ## [2.0.0] - 2017-07-19 ### Added - Includes `eslint-plugin-jsx-a11y` and `eslint-plugin-relay` ### Changed - Upgraded ESLint and other peer dependencies to latest versions. ## [1.1.1] - 2016-09-13 ### Fixed - Added `'use strict'` to ensure the `strict` config works in Node.js v4.x ## [1.1.0] - 2016-09-07 ### Added - `fbjs/strict` config, with the same rules enabled as the default config, with each warning upgraded to an error. ### Changed - Switched to use eslint-plugin-flowtype for Flow-related rules ## [1.0.0] - 2016-07-12 ### Added - Initial import from fbjs-scripts - Synced out additional configuration, enabled several plugins fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/LICENSE000066400000000000000000000020701335022644200220120ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/README.md000066400000000000000000000030231335022644200222630ustar00rootroot00000000000000# eslint-config-fbjs For the most part, this configuration matches the ESLint configuration we have internally at Facebook. There are several exceptions: - **No special cases for projects.** Some projects have stricter lint rules. Those configurations are not present here. If you open source a project with different configuration, just specify the overrides in your own repository's `.eslintrc` - **No fb-specific rules.** We have a number of custom rules internally that are not synced out. We may do that in the future. This means there are several things which we will not catch here but will be caught in Phabricator. Beware of that when relying on this configuration as your only linting process. ## Usage ### Install: #### `npm` ```sh npm install --save-dev \ eslint-config-fbjs \ eslint-plugin-babel \ eslint-plugin-flowtype \ eslint-plugin-jsx-a11y \ eslint-plugin-react \ eslint-plugin-relay \ eslint \ babel-eslint ``` #### `yarn` ```sh yarn add --dev \ eslint-config-fbjs \ eslint-plugin-babel \ eslint-plugin-flowtype \ eslint-plugin-jsx-a11y \ eslint-plugin-react \ eslint-plugin-relay \ eslint \ babel-eslint ``` ### Configure Add `extends: 'fbjs'` to your local `.eslintrc` #### Strict Configuration This package also comes with a *strict* version of the config. This can be used to make all warnings be reported as errors. While this can be overly strict, it can be helpful to avoid the case where some CI configurations don't fail for warnings. Use `extends: fbjs/strict` in your `.eslintrc` fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/index.js000066400000000000000000000552211335022644200224600ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * This file resembles what we use for our internal configuration. Several changes * have been made to acoomodate the differences between our internal setup and * what we would expect to see in open source. * * Internally we also lint each file individually, allowing use to use the file * path to selectively enable/disable pieces of the lint configuration. For * example, we don't actually want jest globals to be enabled all the time so * we only enable that when we know we're linting a test file. That isn't possible * here so we just always enable that. * * We are also missing our growing library of custom rules. Many of those will * make their way out here soon, but it does mean we need to do some editing of * our configuration object. */ 'use strict'; const shared = require('./shared'); const maxLenIgnorePattern = shared.maxLenIgnorePattern; // see http://eslint.org/docs/user-guide/configuring.html#configuring-rules const OFF = 0; const WARNING = 1; const ERROR = 2; const INDENT_SIZE = 2; function getBaseConfig() { return { parser: 'babel-eslint', parserOptions: { ecmaVersion: 6, sourceType: 'module', }, plugins: [ 'babel', 'flowtype', 'jsx-a11y', 'react', 'relay', ], // Tries to match the jshint configuration as closely as possible, with the // exeception of a few things that jshint doesn't check, but that we really // shouldn't be using anyways. // // Things that jshint checked for are errors, new rules are warnings. // // If you update eslint, be sure to check the changelog to figure out what // rules to add/remove to/from this list. rules: { // Possible Errors // Forked and moved to fb-www/comma-dangle 'comma-dangle': OFF, // equivalent to jshint boss 'no-cond-assign': OFF, // equivalent to jshint devel 'no-console': [WARNING, { allow: ['warn', 'error', 'time', 'timeEnd', 'timeStamp'], }], // prohibits things like `while (true)` 'no-constant-condition': OFF, // we need to be able to match these 'no-control-regex': OFF, // equivalent to jshint debug 'no-debugger': ERROR, // equivalent to jshint W004 'no-dupe-args': ERROR, // syntax error in strict mode, almost certainly unintended in any case 'no-dupe-keys': ERROR, // almost certainly a bug 'no-duplicate-case': WARNING, // almost certainly a bug 'no-empty-character-class': WARNING, // would warn on uncommented empty `catch (ex) {}` blocks 'no-empty': OFF, // can cause subtle bugs in IE 8, and we shouldn't do this anyways 'no-ex-assign': WARNING, // we shouldn't do this anyways 'no-extra-boolean-cast': WARNING, // parens may be used to improve clarity, equivalent to jshint W068 'no-extra-parens': [WARNING, 'functions'], // equivalent to jshint W032 'no-extra-semi': WARNING, // a function delaration shouldn't be rewritable 'no-func-assign': ERROR, // babel and es6 allow block-scoped functions 'no-inner-declarations': OFF, // will cause a runtime error 'no-invalid-regexp': WARNING, // disallow non-space or tab whitespace characters 'no-irregular-whitespace': WARNING, // write `if (!(a in b))`, not `if (!a in b)`, equivalent to jshint W007 'no-negated-in-lhs': ERROR, // will cause a runtime error 'no-obj-calls': ERROR, // improves legibility 'no-regex-spaces': WARNING, // equivalent to jshint elision 'no-sparse-arrays': ERROR, // equivalent to jshint W027 'no-unreachable': ERROR, // equivalent to jshint use-isnan 'use-isnan': ERROR, // probably too noisy ATM 'valid-jsdoc': OFF, // equivalent to jshint notypeof 'valid-typeof': ERROR, // we already require semicolons 'no-unexpected-multiline': OFF, // Best Practices // probably a bug, we shouldn't actually even use this yet, because of IE8 'accessor-pairs': [WARNING, {setWithoutGet: true}], // probably too noisy ATM 'block-scoped-var': OFF, // cyclomatic complexity, we're too far gone 'complexity': OFF, // require return statements to either always or never specify values 'consistent-return': WARNING, // style guide: Always use brackets, even when optional. 'curly': [WARNING, 'all'], // we don't do this/care about this 'default-case': OFF, // disabled in favor of our temporary fork 'dot-notation': OFF, // we don't do this/care about this, but probably should eventually 'dot-location': OFF, // disabled as it's too noisy ATM 'eqeqeq': [OFF, 'allow-null'], // we don't do this/care about this, equivalent to jshint forin 'guard-for-in': OFF, // we have too many internal examples/tools using this 'no-alert': OFF, // incompatible with 'use strict' equivalent to jshint noarg 'no-caller': ERROR, // we don't care about this right now, but might later 'no-case-declarations': OFF, // we don't do this/care about this 'no-div-regex': OFF, // we don't do this/care about this 'no-else-return': OFF, // avoid mistaken variables when destructuring 'no-empty-pattern': WARNING, // see eqeqeq: we explicitly allow this, equivalent to jshint eqnull 'no-eq-null': OFF, // equivalent to jshint evil 'no-eval': ERROR, // should only be triggered on polyfills, which we can fix case-by-case 'no-extend-native': WARNING, // might be a sign of a bug 'no-extra-bind': WARNING, // equivalent to jshint W089 'no-fallthrough': WARNING, // equivalent to jshint W008 'no-floating-decimal': ERROR, // implicit coercion is often idiomatic 'no-implicit-coercion': OFF, // equivalent to jshint evil/W066 'no-implied-eval': ERROR, // will likely create more signal than noise 'no-invalid-this': OFF, // babel should handle this fine 'no-iterator': OFF, // Should be effectively equivalent to jshint W028 - allowing the use // of labels in very specific situations. ESLint no-empty-labels was // deprecated. 'no-labels': [ERROR, {allowLoop: true, allowSwitch: true}], // lone blocks create no scope, will ignore blocks with let/const 'no-lone-blocks': WARNING, // equivalent to jshint loopfunc 'no-loop-func': OFF, // we surely have these, don't bother with it 'no-magic-numbers': OFF, // we may use this for alignment in some places 'no-multi-spaces': OFF, // equivalent to jshint multistr, consider using es6 template strings 'no-multi-str': ERROR, // equivalent to jshint W02OFF, similar to no-extend-native 'no-native-reassign': [ERROR, {exceptions: ['Map', 'Set']}], // equivalent to jshint evil/W054 'no-new-func': ERROR, // don't use constructors for side-effects, equivalent to jshint nonew 'no-new': WARNING, // very limited uses, mostly in third_party 'no-new-wrappers': WARNING, // deprecated in ES5, but we still use it in some places 'no-octal-escape': WARNING, // deprecated in ES5, may cause unexpected behavior 'no-octal': WARNING, // treats function parameters as constants, probably too noisy ATM 'no-param-reassign': OFF, // only relevant to node code 'no-process-env': OFF, // deprecated in ES3.WARNING, equivalent to jshint proto 'no-proto': ERROR, // jshint doesn't catch this, but this is inexcusable 'no-redeclare': WARNING, // equivalent to jshint boss 'no-return-assign': OFF, // equivalent to jshint scripturl 'no-script-url': ERROR, // not in jshint, but is in jslint, and is almost certainly a mistake 'no-self-compare': WARNING, // there are very limited valid use-cases for this 'no-sequences': WARNING, // we're already pretty good about this, and it hides stack traces 'no-throw-literal': ERROR, // breaks on `foo && foo.bar()` expression statements, which are common 'no-unused-expressions': OFF, // disallow unnecessary .call() and .apply() 'no-useless-call': WARNING, // disallow concatenating string literals 'no-useless-concat': WARNING, // this has valid use-cases, eg. to circumvent no-unused-expressions 'no-void': OFF, // this journey is 1% finished (allow TODO comments) 'no-warning-comments': OFF, // equivalent to jshint withstmt 'no-with': OFF, // require radix argument in parseInt, we do this in most places already 'radix': WARNING, // we don't do this/care about this 'vars-on-top': OFF, // equivalent to jshint immed 'wrap-iife': OFF, // probably too noisy ATM 'yoda': OFF, // Strict Mode // jshint wasn't checking this, and the compiler should add this anyways 'strict': OFF, // Variables // we don't do this/care about this 'init-declarations': OFF, // equivalent to jshint W002, catches an IE8 bug 'no-catch-shadow': ERROR, // equivalent to jshint W051, is a strict mode violation 'no-delete-var': ERROR, // we should avoid labels anyways 'no-label-var': WARNING, // redefining undefined, NaN, Infinity, arguments, and eval is bad, mkay? 'no-shadow-restricted-names': WARNING, // a definite code-smell, but probably too noisy 'no-shadow': OFF, // it's nice to be explicit sometimes: `let foo = undefined;` 'no-undef-init': OFF, // equivalent to jshint undef, turned into an error in getConfig 'no-undef': WARNING, // using undefined is safe because we enforce no-shadow-restricted-names 'no-undefined': OFF, // equivalent to jshint unused 'no-unused-vars': [WARNING, {args: 'none', varsIgnorePattern: '^_'}], // too noisy 'no-use-before-define': OFF, // Node.js // TODO: turn some of these on in places where we lint node code 'callback-return': OFF, 'global-require': OFF, 'handle-callback-err': OFF, 'no-mixed-requires': OFF, 'no-new-require': OFF, 'no-path-concat': OFF, 'no-process-exit': OFF, 'no-restricted-modules': OFF, 'no-sync': OFF, // Stylistic Issues // See also: https://our.intern.facebook.com/intern/dex/style-guide/ 'array-bracket-spacing': WARNING, // TODO: enable this with consensus on single line blocks 'block-spacing': OFF, 'brace-style': [WARNING, '1tbs', {allowSingleLine: true}], // too noisy at the moment, and jshint didn't check it 'camelcase': [OFF, {properties: 'always'}], 'comma-spacing': [WARNING, {before: false, after: true}], // jshint had laxcomma, but that was against our style guide 'comma-style': [WARNING, 'last'], 'computed-property-spacing': [WARNING, 'never'], // we may use more contextually relevant names for this than self 'consistent-this': [OFF, 'self'], // should be handled by a generic TXT linter instead 'eol-last': OFF, 'func-names': OFF, // too noisy ATM 'func-style': [OFF, 'declaration'], // no way we could enforce min/max lengths or patterns for vars 'id-length': OFF, 'id-match': OFF, // we weren't enforcing this with jshint, so erroring would be too noisy 'indent': [WARNING, INDENT_SIZE, {SwitchCase: 1}], // we use single quotes for JS literals, double quotes for JSX literals 'jsx-quotes': [WARNING, 'prefer-double'], // we may use extra spaces for alignment 'key-spacing': [OFF, {beforeColon: false, afterColon: true}], 'keyword-spacing': [WARNING], 'lines-around-comment': OFF, // should be handled by a generic TXT linter instead 'linebreak-style': [OFF, 'unix'], 'max-depth': OFF, 'max-len': [WARNING, 80, INDENT_SIZE, {'ignorePattern': maxLenIgnorePattern, 'ignoreUrls': true}, ], 'max-nested-callbacks': OFF, 'max-params': OFF, 'max-statements': OFF, // https://facebook.com/groups/995898333776940/1027358627297577 'new-cap': OFF, // equivalent to jshint W058 'new-parens': ERROR, 'newline-after-var': OFF, 'no-array-constructor': ERROR, 'no-bitwise': WARNING, 'no-continue': OFF, 'no-inline-comments': OFF, // doesn't play well with `if (__DEV__) {}` 'no-lonely-if': OFF, // stopgap, irrelevant if we can eventually turn `indent` on to error 'no-mixed-spaces-and-tabs': ERROR, // don't care 'no-multiple-empty-lines': OFF, 'no-negated-condition': OFF, // we do this a bunch of places, and it's less bad with proper indentation 'no-nested-ternary': OFF, // similar to FacebookWebJSLintLinter's checkPhpStyleArray 'no-new-object': WARNING, 'no-plusplus': OFF, 'no-restricted-syntax': OFF, 'no-spaced-func': WARNING, 'no-ternary': OFF, // should be handled by a generic TXT linter instead 'no-trailing-spaces': OFF, // we use this for private/protected identifiers 'no-underscore-dangle': OFF, // disallow `let isYes = answer === 1 ? true : false;` 'no-unneeded-ternary': WARNING, // too noisy ATM 'object-curly-spacing': OFF, // makes indentation warnings clearer 'one-var': [WARNING, {initialized: 'never'}], // prefer `x += 4` over `x = x + 4` 'operator-assignment': [WARNING, 'always'], // equivalent to jshint laxbreak 'operator-linebreak': OFF, 'padded-blocks': OFF, // probably too noisy on pre-ES5 code 'quote-props': [OFF, 'as-needed'], 'quotes': [ WARNING, 'single', { avoidEscape: true, allowTemplateLiterals: true, }, ], 'require-jsdoc': OFF, 'semi-spacing': [WARNING, {before: false, after: true}], // equivalent to jshint asi/W032 'semi': [WARNING, 'always'], 'sort-vars': OFF, // require `if () {` instead of `if (){` 'space-before-blocks': [WARNING, 'always'], // require `function foo()` instead of `function foo ()` 'space-before-function-paren': [ WARNING, {anonymous: 'never', named: 'never'}, ], // incompatible with our legacy inline type annotations 'space-in-parens': [OFF, 'never'], 'space-infix-ops': [WARNING, {int32Hint: true}], 'space-unary-ops': [WARNING, {words: true, nonwords: false}], // TODO: Figure out a way to do this that doesn't break typechecks // or wait for https://github.com/eslint/eslint/issues/2897 'spaced-comment': [OFF, 'always', {exceptions: ['jshint', 'jslint', 'eslint', 'global']}], 'wrap-regex': OFF, // ECMAScript 6 'arrow-body-style': OFF, // Forked to fb-www/arrow-parens to fix issues with flow and add fixer 'arrow-parens': OFF, // tbgs finds *very few* places where we don't put spaces around => 'arrow-spacing': [WARNING, {before: true, after: true}], // violation of the ES6 spec, won't transform 'constructor-super': ERROR, // https://github.com/babel/babel-eslint#known-issues 'generator-star-spacing': OFF, 'no-class-assign': WARNING, 'no-confusing-arrow': OFF, // this is a runtime error 'no-const-assign': ERROR, 'no-dupe-class-members': ERROR, // violation of the ES6 spec, won't transform, `this` is part of the TDZ 'no-this-before-super': ERROR, 'no-useless-computed-key': WARNING, // we have way too much ES3 & ES5 code 'no-var': OFF, 'object-shorthand': OFF, 'prefer-const': OFF, 'prefer-spread': OFF, // we don't support/polyfill this yet 'prefer-reflect': OFF, 'prefer-template': OFF, // there are legitimate use-cases for an empty generator 'require-yield': OFF, // eslint-plugin-babel 'babel/generator-star-spacing': OFF, 'babel/new-cap': OFF, 'babel/array-bracket-spacing': OFF, 'babel/object-curly-spacing': OFF, 'babel/object-shorthand': OFF, 'babel/arrow-parens': OFF, 'babel/no-await-in-loop': OFF, 'babel/flow-object-type': [WARNING, 'comma'], // eslint-plugin-react // TODO: We're being extremely conservative here as we roll out eslint on // www. As we finish rollout, we can turn on more of these, and replace // some legacy regex rules in the process. 'react/display-name': OFF, 'react/forbid-prop-types': OFF, 'react/jsx-boolean-value': OFF, 'react/jsx-closing-bracket-location': OFF, 'react/jsx-curly-spacing': OFF, 'react/jsx-equals-spacing': WARNING, 'react/jsx-filename-extension': OFF, 'react/jsx-first-prop-new-line': OFF, 'react/jsx-handler-names': OFF, 'react/jsx-indent': OFF, 'react/jsx-indent-props': OFF, 'react/jsx-key': OFF, 'react/jsx-max-props-per-line': OFF, 'react/jsx-no-bind': OFF, 'react/jsx-no-duplicate-props': ERROR, 'react/jsx-no-literals': OFF, 'react/jsx-no-target-blank': OFF, 'react/jsx-no-undef': ERROR, 'react/jsx-pascal-case': OFF, 'react/jsx-sort-props': OFF, 'react/jsx-space-before-closing': OFF, // forked to fb-www/jsx-uses-react 'react/jsx-uses-react': OFF, 'react/jsx-uses-vars': ERROR, 'react/jsx-wrap-multilines': OFF, 'react/no-comment-textnodes': OFF, 'react/no-danger': OFF, 'react/no-deprecated': OFF, 'react/no-did-mount-set-state': OFF, 'react/no-did-update-set-state': OFF, 'react/no-direct-mutation-state': OFF, 'react/no-is-mounted': WARNING, 'react/no-multi-comp': OFF, 'react/no-render-return-value': OFF, 'react/no-set-state': OFF, 'react/no-string-refs': OFF, 'react/no-unknown-property': OFF, 'react/prefer-es6-class': OFF, 'react/prefer-stateless-function': OFF, 'react/prop-types': OFF, // forked to fb-www/react-in-jsx-scope 'react/react-in-jsx-scope': OFF, 'react/require-extension': OFF, 'react/require-optimization': OFF, 'react/require-render-return': OFF, 'react/self-closing-comp': OFF, 'react/sort-comp': OFF, 'react/sort-prop-types': OFF, // JSX Accessibility checks 'jsx-a11y/accessible-emoji': OFF, 'jsx-a11y/anchor-has-content': OFF, 'jsx-a11y/aria-activedescendant-has-tabindex': OFF, 'jsx-a11y/aria-props': WARNING, 'jsx-a11y/aria-proptypes': OFF, 'jsx-a11y/aria-role': WARNING, 'jsx-a11y/aria-unsupported-elements': OFF, 'jsx-a11y/click-events-have-key-events': OFF, 'jsx-a11y/heading-has-content': OFF, 'jsx-a11y/html-has-lang': OFF, 'jsx-a11y/iframe-has-title': OFF, 'jsx-a11y/img-has-alt': OFF, 'jsx-a11y/img-redundant-alt': OFF, 'jsx-a11y/interactive-supports-focus': [ WARNING, { tabbable: [ 'button', 'checkbox', 'link', 'searchbox', 'spinbutton', 'switch', 'textbox', ], }, ], 'jsx-a11y/label-has-for': OFF, 'jsx-a11y/lang': OFF, 'jsx-a11y/mouse-events-have-key-events': OFF, 'jsx-a11y/no-access-key': OFF, 'jsx-a11y/no-autofocus': OFF, 'jsx-a11y/no-distracting-elements': OFF, 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ WARNING, { tr: ['none', 'presentation'], }, ], 'jsx-a11y/no-noninteractive-element-interactions': [ WARNING, { handlers: ['onClick'], }, ], 'jsx-a11y/no-noninteractive-element-to-interactive-role': [ WARNING, { ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], li: ['menuitem', 'option', 'row', 'tab', 'treeitem'], table: ['grid'], td: ['gridcell'], }, ], 'jsx-a11y/no-noninteractive-tabindex': WARNING, 'jsx-a11y/no-onchange': OFF, 'jsx-a11y/no-redundant-roles': OFF, 'jsx-a11y/no-static-element-interactions': [ WARNING, { handlers: ['onClick'], }, ], 'jsx-a11y/role-has-required-aria-props': WARNING, 'jsx-a11y/role-supports-aria-props': WARNING, 'jsx-a11y/scope': OFF, 'jsx-a11y/tabindex-no-positive': WARNING, // eslint-plugin-flowtype // These don't actually result in warnings. Enabling them ensures they run // and mark variables as used, avoiding false positives with Flow // annotations. 'flowtype/define-flow-type': WARNING, 'flowtype/use-flow-type': WARNING, 'relay/graphql-syntax': ERROR, 'relay/graphql-naming': ERROR, 'relay/compat-uses-vars': WARNING, }, // Defines a basic set of globals env: { browser: true, es6: true, }, globals: shared.globals, }; } // Override some rules for open source. Due to the way we apply our configuation // internally, these are effectively part of the same configuration we apply. var config = getBaseConfig(); var extendedConfig = { env: { // Enable these blindly because we can't make a per-file decision about this. node: true, jest: true, jasmine: true, }, rules: { // just turned into an error here since we almost always do that anyway. 'no-undef': ERROR, // Re-enable some forked rules. Good enough for open source 'comma-dangle': [WARNING, 'always-multiline'], 'react/jsx-uses-react': ERROR, 'react/react-in-jsx-scope': ERROR, // To keep base config in sync with internal codebase but still make // open source happy, disable a deprecated rule and enable different one. 'babel/flow-object-type': OFF, 'flowtype/object-type-delimiter': [WARNING, 'comma'], }, }; Object.keys(extendedConfig).forEach((key) => { config[key] = Object.assign(config[key], extendedConfig[key]); }); module.exports = config; fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/package.json000066400000000000000000000012711335022644200232750ustar00rootroot00000000000000{ "name": "eslint-config-fbjs", "version": "2.0.1", "description": "", "repository": "facebook/fbjs", "license": "MIT", "main": "index.js", "files": [ "CHANGELOG.md", "LICENSE", "README.md", "index.js", "opensource/", "shared.js", "strict.js", "utils/" ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "peerDependencies": { "babel-eslint": "^7.2.3 || ^8.0.0 || ^9.0.0", "eslint": "^4.2.0 || ^5.0.0", "eslint-plugin-babel": "^4.1.1 || ^5.0.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-react": "^7.1.0", "eslint-plugin-relay": "~0.0.8" } } fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/scripts/000077500000000000000000000000001335022644200224755ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/scripts/check-rules.js000066400000000000000000000016551335022644200252470ustar00rootroot00000000000000/** * Finds rules that are supported by ESLint but not defined in our config. */ var ourRules = new Set(Object.keys(require('..').rules)); var supportedRules = new Set(Object.keys(require('eslint/lib/load-rules')())); // Get plugins from package.json. Assume they're all in peerDependencies. var plugins = Object.keys(require('../package.json').peerDependencies) .filter((dep) => dep.startsWith('eslint-plugin')) .map((dep) => dep.replace('eslint-plugin-', '')); plugins.forEach((plugin) => { Object.keys(require(`eslint-plugin-${plugin}`).rules).forEach((rule) => { supportedRules.add(`${plugin}/${rule}`); }); }); var missing = new Set(); var extra = new Set(); ourRules.forEach((rule) => { if (!supportedRules.has(rule)) { extra.add(rule); } }); supportedRules.forEach((rule) => { if (!ourRules.has(rule)) { missing.add(rule); } }); console.log('missing', missing); console.log('extra', extra); fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/shared.js000066400000000000000000000067751335022644200226310ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // The jshint code had more globals, which may have had something to do with // machine-generated code. I couldn't find references with tbgs. // // Values of true mean the global may be modified. Values of false represent // constants. const globals = { __DEV__: true, // Haste-defined variables require: true, requireDynamic: true, requireLazy: true, // more haste variables are defined in getConfig for modules // Workarounds for https://github.com/babel/babel-eslint/issues/130 // no-undef errors incorrectly on these global flow types // https://fburl.com/flow-react-defs ReactComponent: false, ReactClass: false, ReactElement: false, ReactPropsCheckType: false, ReactPropsChainableTypeChecker: false, ReactPropTypes: false, SyntheticEvent: false, SyntheticClipboardEvent: false, SyntheticCompositionEvent: false, SyntheticInputEvent: false, SyntheticUIEvent: false, SyntheticFocusEvent: false, SyntheticKeyboardEvent: false, SyntheticMouseEvent: false, SyntheticDragEvent: false, SyntheticWheelEvent: false, SyntheticTouchEvent: false, // a bunch of types extracted from http://git.io/vOtv9 // there's a bunch of overlap with browser globals, so we try to avoid // redefining some of those. $Either: false, $All: false, $Tuple: false, $Supertype: false, $Subtype: false, $Shape: false, $Diff: false, $Keys: false, $Enum: false, $Exports: false, Class: false, function: false, Iterable: false, // suppress types $FlowIssue: false, $FlowFixMe: false, $FixMe: false, // https://fburl.com/flow-core-defs Iterator: false, IteratorResult: false, $await: false, ArrayBufferView: false, // https://fburl.com/flow-fb-defs FbtResult: false, $jsx: false, FBID: false, AdAccountID: false, UID: false, ReactNode: false, Fbt: false, // https://fburl.com/flow-liverail-defs LRID: false, // https://fburl.com/flow-powereditor-def UkiAccount: false, UkiAdgroup: false, UkiCampaign: false, UkiCampaignGroup: false, // some of this maybe should be handled by the npm globals module, but it // doesn't have proper WebRTC support yet // https://fburl.com/flow-webrtc-defs RTCConfiguration: false, RTCIceServer: false, RTCOfferOptions: false, RTCStatsReport: false, RTCStatsCallback: false, RTCPeerConnection: false, RTCPeerConnectionErrorCallback: false, RTCSessionDescription: false, RTCSessionDescriptionInit: false, RTCSessionDescriptionCallback: false, RTCIceCandidate: false, RTCIceCandidateInit: false, RTCPeerConnectionIceEvent: false, RTCPeerConnectionIceEventInit: false, RTCDataChannel: false, RTCDataChannelInit: false, RTCDataChannelEvent: false, RTCDataChannelEventInit: false, }; // This pattern will match these texts: // var Foo = require('Foo'); // var Bar = require('Foo').Bar; // var BarFoo = require(Bar + 'Foo'); // var {Bar, Foo} = require('Foo'); // import type {Bar, Foo} from 'Foo'; // Also supports 'let' and 'const'. const variableNamePattern = String.raw`\s*[a-zA-Z_$][a-zA-Z_$\d]*\s*`; const maxLenIgnorePattern = String.raw`^(?:var|let|const|import type)\s+` + '{?' + variableNamePattern + '(?:,' + variableNamePattern + ')*}?' + String.raw`\s*(?:=\s*require\(|from)[a-zA-Z_+./"'\s\d\-]+\)?[^;\n]*[;\n]`; module.exports = { globals: globals, maxLenIgnorePattern: maxLenIgnorePattern, }; fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/strict.js000066400000000000000000000004721335022644200226570ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; let changeErrorLevel = require('./utils/change-error-level'); module.exports = changeErrorLevel(require('.'), 2); fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/utils/000077500000000000000000000000001335022644200221465ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/eslint-config-fbjs/utils/change-error-level.js000066400000000000000000000014031335022644200261630ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; function isOff(rule) { return rule === 0 || rule === 'off'; } function changeErrorLevel(config, level) { // Clone the config so we don't mutate. config = JSON.parse(JSON.stringify(config)) Object.keys(config.rules).forEach((rule) => { let val = config.rules[rule]; if (Array.isArray(val)) { if (isOff(val[0])) { return; } val[0] = level; config.rules[rule] = level; return; } if (isOff(val)) { return; } config.rules[rule] = level; }); return config; } module.exports = changeErrorLevel; fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/000077500000000000000000000000001335022644200200065ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/CHANGELOG.md000066400000000000000000000003301335022644200216130ustar00rootroot00000000000000## [1.0.1] - 2017-07-18 ### Fixed - Added `repository` field in `package.json` to fix issue with some tools. ## [1.0.0] - 2016-07-14 ### Added - Initial release with variables used by Fixed Data Table and Draft. fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/LICENSE000066400000000000000000000020701335022644200210120ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/README.md000066400000000000000000000023351335022644200212700ustar00rootroot00000000000000# fbjs-css-vars This package exports a few of the CSS variables that we use in Facebook projects. This is not the full list we have internally but focused on making available the minimum set needed by our open source projects. ## Usage There are almost no use cases where a product will use this module. It will primarily be consumed by one of the following: ### `cssVar` This is a module that will read from the list we have here and return the corresponding value. Internally we transform this statically but we don't currently do that in our open source projects. ```js React.render(
, containerNode ); ``` ### CSS In order to directly sync out our internal CSS and have it parsed by browser, we need to apply some transforms like we do internally. One of those transforms will insert the variables we have available here. In the future we may make use of [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables). ```css .class { background-color: var(fbui-white); } ``` ### Direct Usage We're just exporting a JS Object so usage is straightforward. ```js var fbCSSVars = require('fbjs-css-vars') console.log(fbCSSVars['fbui-white']); ``` fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/index.js000066400000000000000000000012021335022644200214460ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ module.exports = { 'fbui-desktop-background-light': '#f6f7f8', 'fbui-desktop-text-placeholder': '#9197a3', 'fbui-desktop-text-placeholder-focused': '#bdc1c9', 'fbui-white': '#fff', 'scrollbar-face-active-color': '#7d7d7d', 'scrollbar-face-color': '#c2c2c2', 'scrollbar-face-margin': '4px', 'scrollbar-face-radius': '6px', 'scrollbar-size': '15px', 'scrollbar-size-large': '17px', 'scrollbar-track-color': 'rgba(255, 255, 255, 0.8)', }; fbjs-fbjs-v1.0.0/packages/fbjs-css-vars/package.json000066400000000000000000000007041335022644200222750ustar00rootroot00000000000000{ "name": "fbjs-css-vars", "version": "1.0.1", "description": "This package exports a few of the CSS variables that we use in Facebook projects. This is not the full list we have internally but focused on making available the minimum set needed by our open source projects.", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "repository": "facebook/fbjs", "license": "MIT" } fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/000077500000000000000000000000001335022644200207015ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/LICENSE000066400000000000000000000020701335022644200217050ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/README.md000066400000000000000000000004131335022644200221560ustar00rootroot00000000000000# fbjs-eslint-utils A collection of shared utilities for our eslint configuration packages. See [eslint-config-fbjs](https://www.npmjs.com/package/eslint-config-fbjs) and [eslint-config-fbjs-opensource](https://www.npmjs.com/package/eslint-config-fbjs-opensource). fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/change-error-level.js000066400000000000000000000014031335022644200247160ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; function isOff(rule) { return rule === 0 || rule === 'off'; } function changeErrorLevel(config, level) { // Clone the config so we don't mutate. config = JSON.parse(JSON.stringify(config)) Object.keys(config.rules).forEach((rule) => { let val = config.rules[rule]; if (Array.isArray(val)) { if (isOff(val[0])) { return; } val[0] = level; config.rules[rule] = level; return; } if (isOff(val)) { return; } config.rules[rule] = level; }); return config; } module.exports = changeErrorLevel; fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/globals.js000066400000000000000000000055721335022644200226730ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // The jshint code had more globals, which may have had something to do with // machine-generated code. I couldn't find references with tbgs. // // Values of true mean the global may be modified. Values of false represent // constants. module.exports = { __DEV__: true, // Haste-defined variables require: true, requireDynamic: true, requireLazy: true, // more haste variables are defined in getConfig for modules // Workarounds for https://github.com/babel/babel-eslint/issues/130 // no-undef errors incorrectly on these global flow types // https://fburl.com/flow-react-defs ReactComponent: false, ReactClass: false, ReactElement: false, ReactPropsCheckType: false, ReactPropsChainableTypeChecker: false, ReactPropTypes: false, SyntheticEvent: false, SyntheticClipboardEvent: false, SyntheticCompositionEvent: false, SyntheticInputEvent: false, SyntheticUIEvent: false, SyntheticFocusEvent: false, SyntheticKeyboardEvent: false, SyntheticMouseEvent: false, SyntheticDragEvent: false, SyntheticWheelEvent: false, SyntheticTouchEvent: false, // a bunch of types extracted from http://git.io/vOtv9 // there's a bunch of overlap with browser globals, so we try to avoid // redefining some of those. $Either: false, $All: false, $Tuple: false, $Supertype: false, $Subtype: false, $Shape: false, $Diff: false, $Keys: false, $Enum: false, $Exports: false, Class: false, function: false, Iterable: false, // suppress types $FlowIssue: false, $FlowFixMe: false, $FixMe: false, // https://fburl.com/flow-core-defs Iterator: false, IteratorResult: false, $await: false, ArrayBufferView: false, // https://fburl.com/flow-fb-defs FbtResult: false, $jsx: false, FBID: false, AdAccountID: false, UID: false, ReactNode: false, Fbt: false, // https://fburl.com/flow-liverail-defs LRID: false, // https://fburl.com/flow-powereditor-def UkiAccount: false, UkiAdgroup: false, UkiCampaign: false, UkiCampaignGroup: false, // some of this maybe should be handled by the npm globals module, but it // doesn't have proper WebRTC support yet // https://fburl.com/flow-webrtc-defs RTCConfiguration: false, RTCIceServer: false, RTCOfferOptions: false, RTCStatsReport: false, RTCStatsCallback: false, RTCPeerConnection: false, RTCPeerConnectionErrorCallback: false, RTCSessionDescription: false, RTCSessionDescriptionInit: false, RTCSessionDescriptionCallback: false, RTCIceCandidate: false, RTCIceCandidateInit: false, RTCPeerConnectionIceEvent: false, RTCPeerConnectionIceEventInit: false, RTCDataChannel: false, RTCDataChannelInit: false, RTCDataChannelEvent: false, RTCDataChannelEventInit: false, }; fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/index.js000066400000000000000000000001061335022644200223430ustar00rootroot00000000000000throw new Error('This does not do anything. Require other modules.'); fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/package.json000066400000000000000000000005401335022644200231660ustar00rootroot00000000000000{ "name": "fbjs-eslint-utils", "version": "1.0.0", "description": "Shared utilities for our eslint configuration packages.", "author": "", "repository": "facebook/fbjs", "main": "index.js", "license": "MIT", "files": [ "LICENCE", "README.md", "change-error-level.js", "globals.js", "index.js", "shared.js" ] } fbjs-fbjs-v1.0.0/packages/fbjs-eslint-utils/shared.js000066400000000000000000000014471335022644200225130ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // This pattern will match these texts: // var Foo = require('Foo'); // var Bar = require('Foo').Bar; // var BarFoo = require(Bar + 'Foo'); // var {Bar, Foo} = require('Foo'); // import type {Bar, Foo} from 'Foo'; // Also supports 'let' and 'const'. const variableNamePattern = String.raw`\s*[a-zA-Z_$][a-zA-Z_$\d]*\s*`; const maxLenIgnorePattern = String.raw`^(?:var|let|const|import type)\s+` + '{?' + variableNamePattern + '(?:,' + variableNamePattern + ')*}?' + String.raw`\s*(?:=\s*require\(|from)[a-zA-Z_+./"'\s\d\-]+\)?[^;\n]*[;\n]`; module.exports = { maxLenIgnorePattern: maxLenIgnorePattern, }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/000077500000000000000000000000001335022644200177345ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/CHANGELOG.md000066400000000000000000000054651335022644200215570ustar00rootroot00000000000000## [0.8.3] - 2018-04-18 ### Changed - Dropped use of `gulp-util` - Relicensed to MIT ## [0.8.2] - 2018-03-27 - Pulled, mistakenly shipped identical code to v0.8.1 ## [0.8.1] - 2017-07-25 ### Added - [jest] New `instrument` flag for `createCacheKeyFunction` ## [0.8.0] - 2017-05-31 ### Added - `fbjs-css-vars` and `setimmediate` are now included in `third-party-module-map.json`. ### Removed - [lint] Moved config to new `eslint-config-fbjs` package. - `immutable` has been removed from `third-party-module-map.json` (no longer a requirement for anything in `fbjs` - should be added to own library module maps if used). ### Changed - Upgraded `cross-spawn` dependency (used in gulp scripts). - Upgraded `core-js` dependency (used in jest scripts). ### Fixed - [gulp] Fixed issue preventing `check-dependencies` from working with npm 4+. - [gulp] Fixed issue where `check-dependencies` would error for extraneous packages. ## [0.7.1] - 2016-05-25 ### Added - `object-assign` and `immutable` are now included in `third-party-module-map.json`. ### Changed - Upgraded `cross-spawn` dependency ## [0.7.0] - 2016-04-28 ### Changed - [lint] Upgraded config to match latest internal config. Requires ESLint >= v2.0.0 (may be using newer rules). - [babel] `babel/default-options` expects Babel 6 and `babel-preset-fbjs` to be installed. ### Removed - [babel] Moved all plugins into new `babel-preset-fbjs` package. ## [0.6.0] - 2016-04-04 ### Added - [babel] Added rewrite-modules plugin for Babel 6 - [babel] Added dev-expression plugin for Babel 6 - [babel] Added default-options for Babel 6 - [gulp] Added strip-provides-module to strip `@providesModule` headers - [gulp] Added check-dependencies to ensure installed packages are compatible with package.json specification - [node] Added check-lib-requires script to ensure all lib files can be required ### Changed - [lint] Moved ESLint config from `eslint/.eslintrc` to `eslint/.eslintrc.js`. requires ESLint >= v1.10. - [lint] Base config updated to match internal config ### Fixed - [babel] Fixed the rewrite-modules plugin to support more Jest methods - [babel] Removed dependency on babel-types ## [0.5.0] - 2015-11-11 - [babel] Add auto-importer plugin for Babel & Babel 6 - [babel] Add auto-importer plugin to default babel options ## [0.4.0] - 2015-11-09 - [babel] Add inline-requires plugin for Babel 6 ## [0.3.0] - 2015-10-23 ### Changed - [lint] `comma-dangle` rule upgraded to warning - [jest] Update `createCacheKeyFunction` to make it compatible with Jest v0.6 ## [0.2.2] - 2015-10-01 ### Added - [lint] Add several globals used by Relay and others - [babel] Added `ua-parser-js` to default module map ## [0.2.1] - 2015-09-17 ### Changed - [jest] Ignore `config` option when creating a cache key ## [0.2.0] - 2015-08-31 ### Added - Initial release as a separate module. fbjs-fbjs-v1.0.0/packages/fbjs-scripts/LICENSE000066400000000000000000000020701335022644200207400ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/fbjs-scripts/README.md000066400000000000000000000011751335022644200212170ustar00rootroot00000000000000# fbjs-scripts This is a collection of tools and scripts intended to be used in conjunction with `fbjs`. Previously these were shipped as a part of `fbjs`. ```js // before (fbjs@0.1.0) var invariant = require('fbjs/lib/invariant'); var devExpression = require('fbjs/scripts/babel/dev-expression'); // after (fbjs, fbjs-scripts@0.2.0) var invariant = require('fbjs/lib/invariant'); var devExpression = require('fbjs-scripts/babel/dev-expression'); ``` ## Why? This ensures that production code consuming `fbjs` library code does not need to install script dependencies, unless you explicitly use them via the `fbjs-scripts` package. fbjs-fbjs-v1.0.0/packages/fbjs-scripts/babel/000077500000000000000000000000001335022644200210015ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/babel/default-options.js000066400000000000000000000010221335022644200244470ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const assign = require('object-assign'); module.exports = function(options) { return { presets: [ require('babel-preset-fbjs/configure')({ rewriteModules: assign({ map: require('../third-party-module-map'), }, options.moduleOpts), }), ], plugins: options.plugins || [], }; }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/000077500000000000000000000000001335022644200207035ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/check-dependencies.js000066400000000000000000000044641335022644200247520ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var path = require('path'); var semver = require('semver'); var spawn = require('cross-spawn'); var through = require('through2'); var PluginError = require('plugin-error'); var colors = require('ansi-colors'); var fancyLog = require('fancy-log'); var PLUGIN_NAME = 'check-dependencies'; module.exports = function(opts) { function read(file, enc, cb) { var cwd = path.dirname(file.path); var pkgData = JSON.parse(file.contents.toString()); var outdated = spawn( 'yarn', ['outdated', '--json'], { cwd: cwd } ); var data = ''; outdated.stdout.on('data', function(chunk) { data += chunk.toString(); }); outdated.on('exit', function(code) { try { // Parse the yarn outdated format (http://jsonlines.org/) var outdatedData = data .split('\n') .filter(Boolean) .map(d => JSON.parse(d))[1]['data']['body']; } catch (e) { console.log('error', e) cb(new PluginError(PLUGIN_NAME, 'npm broke')); } var failures = []; outdatedData.forEach(function(row) { var name = row[0]; var current = row[1]; var type = row[4]; var requested = pkgData[type][name]; if (!requested) { fancyLog('Found extraneous outdated dependency. Consider running `npm prune`'); return; } if (!requested.startsWith('file:') && !semver.satisfies(current, requested)) { // Definitely wrong, so we should error failures.push({name, current, requested}); } }); if (failures.length) { failures.forEach((failure) => { fancyLog( `${colors.bold(failure.name)} is outdated ` + `(${colors.red(failure.current)} does not satisfy ` + `${colors.yellow(failure.requested)})` ); }); var msg = 'Some of your dependencies are outdated. Please run ' + `${colors.bold('npm update')} to ensure you are up to date.`; cb(new PluginError(PLUGIN_NAME, msg)); return; } cb(); }); } return through.obj(read); }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/module-map.js000066400000000000000000000040151335022644200233010ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var PluginError = require('plugin-error'); var through = require('through2'); var fs = require('fs'); var path = require('path'); var PM_REGEXP = require('./shared/provides-module').regexp; var PLUGIN_NAME = 'module-map'; module.exports = function(opts) { // Assume file is a string for now if (!opts || !('moduleMapFile' in opts && 'prefix' in opts)) { throw new PluginError( PLUGIN_NAME, 'Missing options. Ensure you pass an object with `moduleMapFile` and `prefix`' ); } var moduleMapFile = opts.moduleMapFile; var prefix = opts.prefix; var moduleMap = {}; function transform(file, enc, cb) { if (file.isNull()) { cb(null, file); return; } if (file.isStream()) { cb(new PluginError('module-map', 'Streaming not supported')); return; } // Get the @providesModule piece of out the file and save that. var matches = file.contents.toString().match(PM_REGEXP); if (matches) { var name = matches[1]; if (moduleMap.hasOwnProperty(name)) { this.emit( 'error', new PluginError( PLUGIN_NAME, 'Duplicate module found: ' + name + ' at ' + file.path + ' and ' + moduleMap[name] ) ); } moduleMap[name] = file.path; } this.push(file); cb(); } function flush(cb) { // Keep it ABC order for better diffing. var map = Object.keys(moduleMap).sort().reduce(function(prev, curr) { // Rewrite path here since we don't need the full path anymore. prev[curr] = prefix + path.basename(moduleMap[curr], '.js'); return prev; }, {}); fs.writeFile(moduleMapFile, JSON.stringify(map, null, 2), 'utf-8', function() { // avoid calling cb with fs.write callback data cb(); }); } return through.obj(transform, flush); }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/shared/000077500000000000000000000000001335022644200221515ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/shared/provides-module.js000066400000000000000000000004231335022644200256240ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = { regexp: /\r?\n \* \@providesModule (\S+)(?=\r?\n)/, }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/gulp/strip-provides-module.js000066400000000000000000000015141335022644200255170ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var PluginError = require('plugin-error'); var through = require('through2'); var PM_REGEXP = require('./shared/provides-module').regexp; module.exports = function(opts) { function transform(file, enc, cb) { if (file.isNull()) { cb(null, file); return; } if (file.isStream()) { cb(new PluginError('module-map', 'Streaming not supported')); return; } // Get the @providesModule piece out of the file and save that. var contents = file.contents.toString().replace(PM_REGEXP, ''); file.contents = new Buffer(contents); this.push(file); cb(); } return through.obj(transform); }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/jest/000077500000000000000000000000001335022644200207015ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/jest/createCacheKeyFunction.js000066400000000000000000000014531335022644200256100ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const crypto = require('crypto'); const fs = require('fs'); function buildCacheKey(files, base) { return files.reduce( (src, fileName) => src + fs.readFileSync(fileName), base ); } module.exports = files => { const presetVersion = require('../package').dependencies['babel-preset-fbjs']; const cacheKey = buildCacheKey(files, presetVersion); return (src, file, configString, options) => { return crypto .createHash('md5') .update(cacheKey) .update(src + file + configString) .update(options && options.instrument ? 'instrument' : '') .digest('hex'); }; }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/jest/environment.js000066400000000000000000000000601335022644200235770ustar00rootroot00000000000000require('core-js/es6'); global.__DEV__ = true; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/jest/preprocessor.js000066400000000000000000000016301335022644200237650ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const babel = require('@babel/core'); const createCacheKeyFunction = require('./createCacheKeyFunction'); const path = require('path'); module.exports = { process(src, filename) { const options = { presets: [ require('babel-preset-fbjs'), ], filename: filename, retainLines: true, }; return babel.transform(src, options).code; }, // Generate a cache key that is based on the contents of this file and the // fbjs preset package.json (used as a proxy for determining if the preset has // changed configuration at all). getCacheKey: createCacheKeyFunction([ __filename, path.join(path.dirname(require.resolve('babel-preset-fbjs')), 'package.json') ]), }; fbjs-fbjs-v1.0.0/packages/fbjs-scripts/node/000077500000000000000000000000001335022644200206615ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs-scripts/node/check-dev-engines.js000066400000000000000000000036021335022644200244770ustar00rootroot00000000000000/*eslint-disable max-len*/ 'use strict'; var fs = require('fs'); var assert = require('assert'); var exec = require('child_process').exec; var semver = require('semver'); var f = require('util').format; // Make sure we have a package.json to parse. Take it as the first argument // (actually the 3rd for argv). assert( process.argv.length >= 3, 'Expected to receive a package.json file argument to parse' ); var packageFilePath = process.argv[2]; var packageData; try { var packageFile = fs.readFileSync(packageFilePath, {encoding: 'utf-8'}); packageData = JSON.parse(packageFile); } catch (e) { assert( false, f('Expected to be able to parse %s as JSON but we got this error instead: %s', packageFilePath, e) ); } var devEngines = packageData.devEngines; if (devEngines.node !== undefined) { // First check that devEngines are valid semver assert( semver.validRange(devEngines.node), f('devEngines.node (%s) is not a valid semver range', devEngines.node) ); // Then actually check that our version satisfies var nodeVersion = process.versions.node; assert( semver.satisfies(nodeVersion, devEngines.node), f('Current node version is not supported for development, expected "%s" to satisfy "%s".', nodeVersion, devEngines.node) ); } if (devEngines.npm !== undefined) { // First check that devEngines are valid semver assert( semver.validRange(devEngines.npm), f('devEngines.npm (%s) is not a valid semver range', devEngines.npm) ); // Then actually check that our version satisfies exec('npm --version', function(err, stdout, stderr) { assert(err === null, f('Failed to get npm version... %s'), stderr); var npmVersion = stdout.trim(); assert( semver.satisfies(npmVersion, devEngines.npm), f('Current npm version is not supported for development, expected "%s" to satisfy "%s".', npmVersion, devEngines.npm) ); }); } fbjs-fbjs-v1.0.0/packages/fbjs-scripts/node/check-lib-requires.js000066400000000000000000000020531335022644200246750ustar00rootroot00000000000000'use strict'; const assert = require('assert'); const fs = require('fs'); const path = require('path'); const EXTRACT_MODULE_NAME_REGEX = /'\.\/(.+)'/; let didError = false; // Make sure we have a lib to read files from. Take it as the first argument. assert( process.argv.length >= 3, 'Expected to receive an argument to a lib directory' ); const pathToLib = path.resolve(process.cwd(), process.argv[2]); fs.readdir(pathToLib, (err, files) => { files = files.filter((filename) => path.parse(filename).ext === '.js'); files.forEach((filename) => { const requirePath = path.join(pathToLib, filename); const moduleName = path.parse(filename).name; try { require(requirePath); } catch (e) { if (e.code === 'MODULE_NOT_FOUND') { const missingModule = e.toString().match(EXTRACT_MODULE_NAME_REGEX)[1]; console.error(moduleName, 'is missing a dependency:', missingModule); } else { console.error('UNKNOWN ERROR', e); } didError = true; } }); process.exit(didError ? 1 : 0); }); fbjs-fbjs-v1.0.0/packages/fbjs-scripts/package.json000066400000000000000000000010011335022644200222120ustar00rootroot00000000000000{ "name": "fbjs-scripts", "version": "0.8.3", "description": "A bundle of helpful scripts used in projects consuming fbjs.", "repository": "facebook/fbjs", "license": "MIT", "dependencies": { "ansi-colors": "^1.0.1", "@babel/core": "^7.0.0", "babel-preset-fbjs": "file:../babel-preset-fbjs", "core-js": "^2.4.1", "cross-spawn": "^5.1.0", "fancy-log": "^1.3.2", "object-assign": "^4.0.1", "plugin-error": "^0.1.2", "semver": "^5.1.0", "through2": "^2.0.0" } } fbjs-fbjs-v1.0.0/packages/fbjs-scripts/third-party-module-map.json000066400000000000000000000007151335022644200251370ustar00rootroot00000000000000{ "core-js/library/es6/map": "core-js/library/es6/map", "core-js/library/es6/set": "core-js/library/es6/set", "fbjs-css-vars": "fbjs-css-vars", "isomorphic-fetch": "isomorphic-fetch", "object-assign": "object-assign", "promise": "promise", "promise/setimmediate/done": "promise/setimmediate/done", "promise/setimmediate/es6-extensions": "promise/setimmediate/es6-extensions", "setimmediate": "setimmediate", "ua-parser-js": "ua-parser-js" } fbjs-fbjs-v1.0.0/packages/fbjs-scripts/yarn.lock000066400000000000000000000667601335022644200215760ustar00rootroot00000000000000# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" dependencies: "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0": version "7.0.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.1.tgz#406658caed0e9686fa4feb5c2f3cefb6161c0f41" dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" "@babel/helpers" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" lodash "^4.17.10" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" "@babel/generator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" dependencies: "@babel/types" "^7.0.0" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" trim-right "^1.0.1" "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: "@babel/types" "^7.0.0" "@babel/helper-builder-react-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.0.0.tgz#fa154cb53eb918cf2a9a7ce928e29eb649c5acdb" dependencies: "@babel/types" "^7.0.0" esutils "^2.0.0" "@babel/helper-call-delegate@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0.tgz#e036956bb33d76e59c07a04a1fff144e9f62ab78" dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-define-map@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0.tgz#a5684dd2adf30f0137cf9b0bde436f8c2db17225" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/types" "^7.0.0" lodash "^4.17.10" "@babel/helper-function-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0.tgz#a68cc8d04420ccc663dd258f9cc41b8261efa2d4" dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" dependencies: "@babel/types" "^7.0.0" "@babel/helper-hoist-variables@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" dependencies: "@babel/types" "^7.0.0" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0.tgz#b01ee7d543e81e8c3fc404b19c9f26acb6e4cf4c" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" lodash "^4.17.10" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" dependencies: "@babel/types" "^7.0.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" "@babel/helper-replace-supers@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0.tgz#b6f21237280e0be54f591f63a464b66627ced707" dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-simple-access@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0.tgz#ff36a27983ae4c27122da2f7f294dced80ecbd08" dependencies: "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" "@babel/helper-split-export-declaration@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" dependencies: "@babel/types" "^7.0.0" "@babel/helpers@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0.tgz#7213388341eeb07417f44710fd7e1d00acfa6ac0" dependencies: "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" "@babel/parser@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" "@babel/plugin-check-constants@^7.0.0-beta.38": version "7.0.0-beta.38" resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf" "@babel/plugin-proposal-class-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0.tgz#a16b5c076ba6c3d87df64d2480a380e979543731" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" "@babel/plugin-syntax-class-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoping@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" "@babel/plugin-transform-classes@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0.tgz#9e65ca401747dde99e344baea90ab50dccb4c468" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.0.0" "@babel/helper-function-name" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" "@babel/plugin-transform-for-of@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0.tgz#eeda18dc22584e13c3581a68f6be4822bb1d1d81" dependencies: "@babel/helper-function-name" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-member-expression-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.0.0.tgz#96a265bf61a9ed6f75c39db0c30d41ef7aabf072" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-commonjs@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0.tgz#20b906e5ab130dd8e456b694a94d9575da0fd41f" dependencies: "@babel/helper-module-transforms" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.0.0" "@babel/plugin-transform-object-super@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0.tgz#b8587d511309b3a0e96e9e38169908b3e392041e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.0.0" "@babel/plugin-transform-parameters@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0.tgz#da864efa111816a6df161d492f33de10e74b1949" dependencies: "@babel/helper-call-delegate" "^7.0.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-property-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.0.0.tgz#0b95a91dbd1f0be5b5a99ed86571ef5b5ae77009" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-display-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-jsx@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.0.0.tgz#524379e4eca5363cd10c4446ba163f093da75f3e" dependencies: "@babel/helper-builder-react-jsx" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-template-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/template@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80" dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/types" "^7.0.0" "@babel/traverse@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" "@babel/helper-function-name" "^7.0.0" "@babel/helper-split-export-declaration" "^7.0.0" "@babel/parser" "^7.0.0" "@babel/types" "^7.0.0" debug "^3.1.0" globals "^11.1.0" lodash "^4.17.10" "@babel/types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" dependencies: esutils "^2.0.2" lodash "^4.17.10" to-fast-properties "^2.0.0" ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" dependencies: ansi-wrap "^0.1.0" ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" dependencies: ansi-wrap "0.1.0" ansi-gray@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" dependencies: ansi-wrap "0.1.0" ansi-red@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" dependencies: ansi-wrap "0.1.0" ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" arr-diff@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" dependencies: arr-flatten "^1.0.1" array-slice "^0.2.3" arr-flatten@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" arr-union@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" array-slice@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" "babel-preset-fbjs@file:../babel-preset-fbjs": version "2.2.0" dependencies: "@babel/plugin-check-constants" "^7.0.0-beta.38" "@babel/plugin-proposal-class-properties" "^7.0.0" "@babel/plugin-proposal-object-rest-spread" "^7.0.0" "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" "@babel/plugin-transform-arrow-functions" "^7.0.0" "@babel/plugin-transform-block-scoped-functions" "^7.0.0" "@babel/plugin-transform-block-scoping" "^7.0.0" "@babel/plugin-transform-classes" "^7.0.0" "@babel/plugin-transform-computed-properties" "^7.0.0" "@babel/plugin-transform-destructuring" "^7.0.0" "@babel/plugin-transform-flow-strip-types" "^7.0.0" "@babel/plugin-transform-for-of" "^7.0.0" "@babel/plugin-transform-function-name" "^7.0.0" "@babel/plugin-transform-literals" "^7.0.0" "@babel/plugin-transform-member-expression-literals" "^7.0.0" "@babel/plugin-transform-modules-commonjs" "^7.0.0" "@babel/plugin-transform-object-super" "^7.0.0" "@babel/plugin-transform-parameters" "^7.0.0" "@babel/plugin-transform-property-literals" "^7.0.0" "@babel/plugin-transform-react-display-name" "^7.0.0" "@babel/plugin-transform-react-jsx" "^7.0.0" "@babel/plugin-transform-shorthand-properties" "^7.0.0" "@babel/plugin-transform-spread" "^7.0.0" "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" chalk@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: color-name "1.1.3" color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" convert-source-map@^1.1.0: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" dependencies: safe-buffer "~5.1.1" core-js@^2.4.1: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" which "^1.2.9" debug@^3.1.0: version "3.2.5" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407" dependencies: ms "^2.1.1" 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" esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" extend-shallow@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" dependencies: kind-of "^1.1.0" fancy-log@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" dependencies: ansi-gray "^0.1.1" color-support "^1.1.3" time-stamp "^1.0.0" globals@^11.1.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" kind-of@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44" lodash@^4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" lru-cache@^4.0.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" object-assign@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" path-parse@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" plugin-error@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" dependencies: ansi-cyan "^0.1.1" ansi-red "^0.1.1" arr-diff "^1.0.1" arr-union "^2.0.1" extend-shallow "^1.1.2" process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" readable-stream@^2.1.5: version "2.3.6" resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: core-util-is "~1.0.0" inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~2.0.0" safe-buffer "~5.1.1" string_decoder "~1.1.1" util-deprecate "~1.0.1" resolve@^1.3.2: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" semver@^5.1.0, semver@^5.4.1: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: has-flag "^3.0.0" through2@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: readable-stream "^2.1.5" xtend "~4.0.1" time-stamp@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: isexe "^2.0.0" xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" fbjs-fbjs-v1.0.0/packages/fbjs/000077500000000000000000000000001335022644200162475ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/CHANGELOG.md000066400000000000000000000104351335022644200200630ustar00rootroot00000000000000## [Unreleased] ### Added - More modules, primarily focused on the requirements of Fixed Data Table. ### Removed - Remove whitelisting of React PropType warning from `warning` module. - Removed runtime dependency on immutable, reducing package size. ### Changed - More flow annotations: `joinClasses`, `flatMapArray` - Upgraded `core-js` dependency to ^2.4.1 ### Fixed - Fixed strict argument arity issues with `Deferred` module. - `getDocumentScrollElement` now correctly returns the `` element in Chrome 61 instead of ``. ## [0.8.5] - 2016-09-27 ### Fixed - Fixed all remaining issues resulting in Flow errors when `fbjs` is a dependency of a dependency. ### Removed - Removed now extraneous `flow/lib/Promise.js`. ## [0.8.4] - 2016-08-19 ### Changed - Moved `try/catch` in `warning` module to helper function to prevent deopts. ## [0.8.3] - 2016-05-25 ### Added - `Deferred`: added `Deferred.prototype.catch` to avoid having to call this directly on the Promise. - `UnicodeUtilsExtra`: added several methods for escaping strings. ### Changed - More Flow annotations: `containsNode`, `emptyFunction`, `memoizeStringOnly` - Added explicit `` type arguments to in anticipation of a future Flow change requiring them. - `Object.assign` calls now replaced with usage of `object-assign` module. ### Fixed - Type imports in .js.flow files are now properly using relative paths. - `DataTransfer`: handle Firefox better ## [0.8.2] - 2016-05-05 ### Removed - Removed extraneous production dependency ## [0.8.1] - 2016-04-18 ### Added - We now include a `Promise` class definition in `flow/lib` to account for the changes in Flow v0.23 which removed non-spec methods. This will allow our code to continue typechecking while using these methods. ## [0.8.0] - 2016-04-04 ### Added - Several additional modules. Notably, a collection of Unicode utilities and many new `functional` helpers. - `CSSCore`: added `matchesSelector` method ### Changed - Copyright headers updated to reflect current boilerplate - `@providesModule` headers removed from generated source code - Flow files now contain relative requires, improving compatibility with Haste and CommonJS module systems ### Fixed - `isEmpty`: Protect from breaking in environments without `Symbol` defined ## [0.7.2] - 2016-02-05 ### Fixed - `URI`: correctly store reference to value in constructor and return it when stringifying ### Removed - Backed out rejection tracking for React Native `Promise` implementation. That code now lives in React Native. ## [0.7.1] - 2016-02-02 ### Fixed - Corrected require path issue for native `Promise` module ## [0.7.0] - 2016-01-27 ### Added - `Promise` for React Native with rejection tracking in `__DEV__` and a `finally` method - `_shouldPolyfillES6Collection`: check if ES6 Collections need to be polyfilled. ### Removed - `toArray`: removed in favor of using `Array.from` directly. ### Changed - `ErrorUtils`: Re-uses any global instance that already exists - `fetch`: Switched to `isomorphic-fetch` when a global implementation is missing - `shallowEqual`: handles `NaN` values appropriately (as equal), now using `Object.is` semantics ## [0.6.1] - 2016-01-06 ### Changed - `getActiveElement`: no longer throws in non-browser environment (again) ## [0.6.0] - 2015-12-29 ### Changed - Flow: Original source files in `fbjs/flow/include` have been removed in favor of placing original files alongside compiled files in lib with a `.flow` suffix. This requires Flow version 0.19 or greater and a change to `.flowconfig` files to remove the include path. ## [0.5.1] - 2015-12-13 ### Added - `base62` module ## [0.5.0] - 2015-12-04 ### Changed - `getActiveElement`: No longer handles a non-existent `document` ## [0.4.0] - 2015-10-16 ### Changed - `invariant`: Message is no longer prefixed with "Invariant Violation: ". ## [0.3.2] - 2015-10-12 ### Added - Apply appropriate transform (`loose-envify`) when bundling with `browserify` ## [0.3.1] - 2015-10-01 ### Fixed - Ensure the build completes correctly before packaging ## [0.3.0] - 2015-10-01 ### Added - More modules: `memoizeStringOnly`, `joinClasses` - `UserAgent`: Query information about current user agent ### Changed - `fetchWithRetries`: Reject failure with an Error, not the response - `getActiveElement`: no longer throws in non-browser environment fbjs-fbjs-v1.0.0/packages/fbjs/LICENSE000066400000000000000000000020701335022644200172530ustar00rootroot00000000000000MIT License Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fbjs-fbjs-v1.0.0/packages/fbjs/README.md000066400000000000000000000055271335022644200175370ustar00rootroot00000000000000# FBJS ## Purpose To make it easier for Facebook to share and consume our own JavaScript. Primarily this will allow us to ship code without worrying too much about where it lives, keeping with the spirit of `@providesModule` but working in the broader JavaScript ecosystem. **Note:** If you are consuming the code here and you are not also a Facebook project, be prepared for a bad time. APIs may appear or disappear and we may not follow semver strictly, though we will do our best to. This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. In order for us to move fast and ship projects like React and Relay, we've made the decision to not support everybody. We probably won't take your feature requests unless they align with our needs. There will be overlap in functionality here and in other open source projects. ## Usage Any `@providesModule` modules that are used by your project should be added to `src/`. They will be built and added to `module-map.json`. This file will contain a map from `@providesModule` name to what will be published as `fbjs`. The `module-map.json` file can then be consumed in your own project, along with the [rewrite-modules](https://github.com/facebook/fbjs/blob/master/babel-preset/plugins/rewrite-modules.js) Babel plugin (which we'll publish with this), to rewrite requires in your own project. Then, just make sure `fbjs` is a dependency in your `package.json` and your package will consume the shared code. ```js // Before transform const emptyFunction = require('emptyFunction'); // After transform const emptyFunction = require('fbjs/lib/emptyFunction'); ``` See React for an example of this. *Coming soon!* ## Building It's as easy as just running gulp. This assumes you've also done `npm install -g gulp`. ```sh gulp ``` Alternatively `npm run build` will also work. ### Layout Right now these packages represent a subset of packages that we use internally at Facebook. Mostly these are support libraries used when shipping larger libraries, like React and Relay, or products. Each of these packages is in its own directory under `src/`. ### Process Since we use `@providesModule`, we need to rewrite requires to be relative. Thanks to `@providesModule` requiring global uniqueness, we can do this easily. Eventually we'll try to make this part of the process go away by making more projects use CommonJS. ## TODO - Flow: Ideally we'd ship our original files with type annotations, however that's not doable right now. We have a couple options: - Make sure our transpilation step converts inline type annotations to the comment format. - Make our build process also build Flow interface files which we can ship to npm. - Split into multiple packages. This will be better for more concise versioning, otherwise we'll likely just be shipping lots of major versions. fbjs-fbjs-v1.0.0/packages/fbjs/flow/000077500000000000000000000000001335022644200172165ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/flow/lib/000077500000000000000000000000001335022644200177645ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/flow/lib/dev.js000066400000000000000000000003261335022644200211010ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ declare var __DEV__: boolean; fbjs-fbjs-v1.0.0/packages/fbjs/gulpfile.js000066400000000000000000000054211335022644200204160ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const del = require('del'); const flatten = require('gulp-flatten'); const gulp = require('gulp'); const gulpBabel = require('gulp-babel'); const mergeStream = require('merge-stream'); const rename = require('gulp-rename'); const runSequence = require('run-sequence'); const fbjsConfigurePreset = require('babel-preset-fbjs/configure'); const gulpModuleMap = require('fbjs-scripts/gulp/module-map'); const gulpStripProvidesModule = require('fbjs-scripts/gulp/strip-provides-module'); const gulpCheckDependencies = require('fbjs-scripts/gulp/check-dependencies'); const paths = { lib: { src: [ 'src/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', ], dest: 'lib', presetOptions: { stripDEV: true, rewriteModules: { map: require('fbjs-scripts/third-party-module-map'), }, }, }, mocks: { src: [ 'src/**/__mocks__/**/*.js', ], dest: 'lib/__mocks__', presetOptions: { stripDEV: true, rewriteModules: { map: require('fbjs-scripts/third-party-module-map'), prefix: '../', }, }, }, }; const rewriteOptions = { moduleMapFile: './module-map.json', prefix: 'fbjs/lib/', }; gulp.task('clean', function() { return del([paths.lib.dest, paths.mocks.dest]); }); gulp.task('lib', function() { const libTask = gulp .src(paths.lib.src) .pipe(gulpModuleMap(rewriteOptions)) .pipe(gulpStripProvidesModule()) .pipe(gulpBabel(fbjsConfigurePreset(paths.lib.presetOptions))) .pipe(flatten()) .pipe(gulp.dest(paths.lib.dest)); const mockTask = gulp .src(paths.mocks.src) .pipe(gulpBabel(fbjsConfigurePreset(paths.mocks.presetOptions))) .pipe(flatten()) .pipe(gulp.dest(paths.mocks.dest)); return mergeStream(libTask, mockTask); }); gulp.task('flow', function() { return gulp .src(paths.lib.src) .pipe(gulpModuleMap(rewriteOptions)) .pipe(gulpBabel({ presets: [ fbjsConfigurePreset({ autoImport: false, target: 'flow', rewriteModules: { map: require('fbjs-scripts/third-party-module-map'), }, }), ], })) .pipe(flatten()) .pipe(rename({extname: '.js.flow'})) .pipe(gulp.dest(paths.lib.dest)); }); gulp.task('check-dependencies', function() { return gulp .src('package.json') .pipe(gulpCheckDependencies()); }); gulp.task('watch', function() { gulp.watch(paths.src, ['lib', 'flow']); }); gulp.task('build', function(cb) { runSequence('check-dependencies', 'clean', ['lib', 'flow'], cb); }); gulp.task('default', ['build']); fbjs-fbjs-v1.0.0/packages/fbjs/index.js000066400000000000000000000004301335022644200177110ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; throw new Error('The fbjs package should not be required without a full path.'); fbjs-fbjs-v1.0.0/packages/fbjs/package.json000066400000000000000000000041721335022644200205410ustar00rootroot00000000000000{ "name": "fbjs", "version": "1.0.0", "description": "A collection of utility libraries used by other Facebook JS projects", "main": "index.js", "repository": "facebook/fbjs", "scripts": { "build": "gulp build", "postbuild": "node node_modules/fbjs-scripts/node/check-lib-requires.js lib", "lint": "eslint .", "prepublish": "yarn run build", "pretest": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json", "test": "NODE_ENV=test jest", "test-babel-presets": "cd babel-preset && yarn install && yarn test", "flow": "flow check src" }, "devDependencies": { "@babel/core": "^7.0.0", "babel-preset-fbjs": "file:../babel-preset-fbjs", "del": "^2.2.0", "fbjs-scripts": "file:../fbjs-scripts", "flow-bin": "^0.80.0", "gulp": "^3.9.1", "gulp-babel": "^8.0.0", "gulp-flatten": "^0.2.0", "gulp-rename": "^1.2.2", "immutable": "^3.7.6", "jest-cli": "^17.0.3", "merge-stream": "^1.0.0", "run-sequence": "^1.1.5" }, "license": "MIT", "files": [ "LICENSE", "README.md", "flow/", "index.js", "lib/", "module-map.json" ], "jest": { "automock": true, "modulePathIgnorePatterns": [ "/lib/", "/node_modules/" ], "persistModuleRegistryBetweenSpecs": true, "rootDir": "", "setupFiles": [ "node_modules/fbjs-scripts/jest/environment.js" ], "testPathDirs": [ "/src" ], "timers": "fake", "transform": { ".*": "node_modules/fbjs-scripts/jest/preprocessor.js" }, "transformIgnorePatterns": [ "/node_modules/" ], "unmockedModulePathPatterns": [ "/node_modules/", "/src/(?!(__forks__/fetch.js$|fetch/))" ] }, "dependencies": { "core-js": "^2.4.1", "fbjs-css-vars": "^1.0.0", "isomorphic-fetch": "^2.1.1", "loose-envify": "^1.0.0", "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", "ua-parser-js": "^0.7.18" }, "devEngines": { "node": ">=4.x", "npm": ">=2.x" }, "browserify": { "transform": [ "loose-envify" ] } } fbjs-fbjs-v1.0.0/packages/fbjs/src/000077500000000000000000000000001335022644200170365ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/src/.flowconfig000066400000000000000000000001721335022644200211740ustar00rootroot00000000000000[ignore] .*/__tests__/.* [include] ../node_modules [libs] ../flow/lib [options] module.system=haste [version] ^0.80.0 fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/000077500000000000000000000000001335022644200207565ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/Map.js000066400000000000000000000004071335022644200220320ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Map */ module.exports = require('core-js/library/es6/map'); fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/Promise.js000066400000000000000000000003731335022644200227350ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Promise */ module.exports = require('promise'); fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/Promise.native.js000066400000000000000000000011661335022644200242230ustar00rootroot00000000000000/** * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * This module wraps and augments the minimally ES6-compliant Promise * implementation provided by the promise npm package. * */ 'use strict'; var Promise = require('promise/setimmediate/es6-extensions'); require('promise/setimmediate/done'); /** * Handle either fulfillment or rejection with the same callback. */ Promise.prototype.finally = function(onSettled) { return this.then(onSettled, onSettled); }; module.exports = Promise; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/Set.js000066400000000000000000000004071335022644200220500ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Set */ module.exports = require('core-js/library/es6/set'); fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/SiteData.js000066400000000000000000000003751335022644200230170ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule SiteData */ module.exports = { is_rtl: false, };fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/Style.js000066400000000000000000000033461335022644200224220ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Style * @typechecks */ var getStyleProperty = require('getStyleProperty'); /** * @param {DOMNode} element [description] * @param {string} name Overflow style property name. * @return {boolean} True if the supplied ndoe is scrollable. */ function _isNodeScrollable(element, name) { var overflow = Style.get(element, name); return (overflow === 'auto' || overflow === 'scroll'); } /** * Utilities for querying and mutating style properties. */ var Style = { /** * Gets the style property for the supplied node. This will return either the * computed style, if available, or the declared style. * * @param {DOMNode} node * @param {string} name Style property name. * @return {?string} Style property value. */ get: getStyleProperty, /** * Determines the nearest ancestor of a node that is scrollable. * * NOTE: This can be expensive if used repeatedly or on a node nested deeply. * * @param {?DOMNode} node Node from which to start searching. * @return {?DOMWindow|DOMElement} Scroll parent of the supplied node. */ getScrollParent: function(node) { if (!node) { return null; } var ownerDocument = node.ownerDocument; while (node && node !== ownerDocument.body) { if (_isNodeScrollable(node, 'overflow') || _isNodeScrollable(node, 'overflowY') || _isNodeScrollable(node, 'overflowX')) { return node; } node = node.parentNode; } return ownerDocument.defaultView || ownerDocument.parentWindow; }, }; module.exports = Style; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/TokenizeUtil.js000066400000000000000000000025371335022644200237510ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule TokenizeUtil * @typechecks * @stub * @flow */ 'use strict'; // \u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf // is latin supplement punctuation except fractions and superscript // numbers // \u2010-\u2027\u2030-\u205e // is punctuation from the general punctuation block: // weird quotes, commas, bullets, dashes, etc. // \u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f // is CJK punctuation // \uff1a-\uff1f\uff01-\uff0f\uff3b-\uff40\uff5b-\uff65 // is some full-width/half-width punctuation // \u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d\uFD3e\uFD3F // is some Arabic punctuation marks // \u1801\u0964\u104a\u104b // is misc. other language punctuation marks var PUNCTUATION = ( '[.,+*?$|#{}()\'\\^\\-\\[\\]\\\\\\/!@%"~=<>_:;' + '\u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f\uff1a-\uff1f\uff01-\uff0f' + '\uff3b-\uff40\uff5b-\uff65\u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d' + '\uFD3e\uFD3F\u1801\u0964\u104a\u104b\u2010-\u2027\u2030-\u205e' + '\u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf]' ); module.exports = { getPunctuation: (): string => PUNCTUATION, }; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/URI.js000066400000000000000000000006101335022644200217500ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule URI * @flow */ 'use strict'; class URI { _uri: string; constructor(uri: string) { this._uri = uri; } toString(): string { return this._uri; } } module.exports = URI; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/UserAgentData.js000066400000000000000000000045171335022644200240120ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule UserAgentData */ /** * Usage note: * This module makes a best effort to export the same data we would internally. * At Facebook we use a server-generated module that does the parsing and * exports the data for the client to use. We can't rely on a server-side * implementation in open source so instead we make use of an open source * library to do the heavy lifting and then make some adjustments as necessary. * It's likely there will be some differences. Some we can smooth over. * Others are going to be harder. */ 'use strict'; var UAParser = require('ua-parser-js'); var UNKNOWN = 'Unknown'; var PLATFORM_MAP = { 'Mac OS': 'Mac OS X', }; /** * Convert from UAParser platform name to what we expect. */ function convertPlatformName(name) { return PLATFORM_MAP[name] || name; } /** * Get the version number in parts. This is very naive. We actually get major * version as a part of UAParser already, which is generally good enough, but * let's get the minor just in case. */ function getBrowserVersion(version) { if (!version) { return { major: '', minor: '', }; } var parts = version.split('.'); return { major: parts[0], minor: parts[1], }; } /** * Get the UA data fom UAParser and then convert it to the format we're * expecting for our APIS. */ var parser = new UAParser(); var results = parser.getResult(); // Do some conversion first. var browserVersionData = getBrowserVersion(results.browser.version); var uaData = { browserArchitecture: results.cpu.architecture || UNKNOWN, browserFullVersion: results.browser.version || UNKNOWN, browserMinorVersion: browserVersionData.minor || UNKNOWN, browserName: results.browser.name || UNKNOWN, browserVersion: results.browser.major || UNKNOWN, deviceName: results.device.model || UNKNOWN, engineName: results.engine.name || UNKNOWN, engineVersion: results.engine.version || UNKNOWN, platformArchitecture: results.cpu.architecture || UNKNOWN, platformName: convertPlatformName(results.os.name) || UNKNOWN, platformVersion: results.os.version || UNKNOWN, platformFullVersion: results.os.version || UNKNOWN, }; module.exports = uaData; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/cssVar.js000066400000000000000000000010301335022644200225470ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule cssVar */ const fbCSSVars = require('fbjs-css-vars'); const invariant = require('invariant'); /** * @param {string} name */ function cssVar(name) { invariant( Object.prototype.hasOwnProperty.call(fbCSSVars, name), 'Unknown key passed to cssVar: %s.', name ); return fbCSSVars[name]; } module.exports = cssVar; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/cx.js000066400000000000000000000025061335022644200217310ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule cx */ /** * This function is used to mark string literals representing CSS class names * so that they can be transformed statically. This allows for modularization * and minification of CSS class names. * * In static_upstream, this function is actually implemented, but it should * eventually be replaced with something more descriptive, and the transform * that is used in the main stack should be ported for use elsewhere. * * @param string|object className to modularize, or an object of key/values. * In the object case, the values are conditions that * determine if the className keys should be included. * @param [string ...] Variable list of classNames in the string case. * @return string Renderable space-separated CSS className. */ function cx(classNames) { if (typeof classNames == 'object') { return Object.keys(classNames) .filter(className => classNames[className]) .map(replace) .join(' '); } return Array.prototype.map.call(arguments, replace).join(' '); } function replace(str) { return str.replace(/\//g, '-'); } module.exports = cx; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/fetch.js000066400000000000000000000011251335022644200224040ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule fetch */ 'use strict'; // This hopefully supports the React Native case, which is already bringing along // its own fetch polyfill. That should exist on `global`. If that doesn't exist // then we'll try to polyfill, which might not work correctly in all environments. if (global.fetch) { module.exports = global.fetch.bind(global); } else { module.exports = require('isomorphic-fetch'); } fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/getUnboundedScrollPosition.js000066400000000000000000000020221335022644200266370ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule getUnboundedScrollPosition * @typechecks */ 'use strict'; /** * Gets the scroll position of the supplied element or window. * * The return values are unbounded, unlike `getScrollPosition`. This means they * may be negative or exceed the element boundaries (which is possible using * inertial scrolling). * * @param {DOMWindow|DOMElement} scrollable * @return {object} Map with `x` and `y` keys. */ function getUnboundedScrollPosition(scrollable) { if (scrollable.Window && scrollable instanceof scrollable.Window) { return { x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop }; } return { x: scrollable.scrollLeft, y: scrollable.scrollTop }; } module.exports = getUnboundedScrollPosition; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/invariant.js000066400000000000000000000027331335022644200233140ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule invariant * @flow */ 'use strict'; const validateFormat = __DEV__ ? function(format: mixed): void {} : function(format: mixed): void { if (format === undefined) { throw new Error('invariant(...): Second argument must be a string.'); } }; /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments to provide * information about what broke and what you were expecting. * * The invariant message will be stripped in production, but the invariant will * remain to ensure logic does not differ in production. */ function invariant( condition: mixed, format: string, ...args: Array ): void { validateFormat(format); if (!condition) { let error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.', ); } else { let argIndex = 0; error = new Error(format.replace(/%s/g, () => String(args[argIndex++]))); error.name = 'Invariant Violation'; } (error: any).framesToPop = 1; // Skip invariant's own stack frame. throw error; } } module.exports = invariant; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/isEventSupported.js000066400000000000000000000035071335022644200246440ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule isEventSupported */ 'use strict'; var ExecutionEnvironment = require('ExecutionEnvironment'); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature document.implementation.hasFeature('', '') !== true; } /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function isEventSupported(eventNameSuffix, capture) { if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { return false; } var eventName = 'on' + eventNameSuffix; var isSupported = eventName in document; if (!isSupported) { var element = document.createElement('div'); element.setAttribute(eventName, 'return;'); isSupported = typeof element[eventName] === 'function'; } if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { // This is the only way to test support for the `wheel` event in IE9+. isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); } return isSupported; } module.exports = isEventSupported; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/monitorCodeUse.js000066400000000000000000000014031335022644200242510ustar00rootroot00000000000000/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule monitorCodeUse */ 'use strict'; var invariant = require('invariant'); /** * Provides open-source compatible instrumentation for monitoring certain API * uses before we're ready to issue a warning or refactor. It accepts an event * name which may only contain the characters [a-z0-9_] and an optional data * object with further information. */ function monitorCodeUse(eventName, data) { invariant( eventName && !/[^a-z0-9_]/.test(eventName), 'You must provide an eventName using only the characters [a-z0-9_]' ); } module.exports = monitorCodeUse; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/requestAnimationFrame.js000066400000000000000000000004371335022644200256230ustar00rootroot00000000000000/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule requestAnimationFrame */ module.exports = require('requestAnimationFramePolyfill'); fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/requestAnimationFramePolyfill.js000066400000000000000000000015141335022644200273330ustar00rootroot00000000000000/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule requestAnimationFramePolyfill */ var emptyFunction = require('emptyFunction'); var nativeRequestAnimationFrame = require('nativeRequestAnimationFrame'); var lastTime = 0; var requestAnimationFrame = nativeRequestAnimationFrame || function(callback) { var currTime = Date.now(); var timeDelay = Math.max(0, 16 - (currTime - lastTime)); lastTime = currTime + timeDelay; return global.setTimeout(function() { callback(Date.now()); }, timeDelay); }; // Works around a rare bug in Safari 6 where the first request is never invoked. requestAnimationFrame(emptyFunction); module.exports = requestAnimationFrame; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/setImmediate.js000066400000000000000000000006201335022644200237240ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule setImmediate */ 'use strict'; // setimmediate adds setImmediate to the global. We want to make sure we export // the actual function. require('setimmediate') module.exports = global.setImmediate; fbjs-fbjs-v1.0.0/packages/fbjs/src/__forks__/warning.js000066400000000000000000000025411335022644200227630ustar00rootroot00000000000000/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule warning */ 'use strict'; var emptyFunction = require('emptyFunction'); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ function printWarning(format, ...args) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } var warning = __DEV__ ? function(condition, format, ...args) { if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning(format, ...args); } } : emptyFunction; module.exports = warning; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/000077500000000000000000000000001335022644200177665ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/src/core/CSSCore.js000066400000000000000000000101711335022644200215650ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule CSSCore * @typechecks */ const invariant = require('invariant'); /** * The CSSCore module specifies the API (and implements most of the methods) * that should be used when dealing with the display of elements (via their * CSS classes and visibility on screen. It is an API focused on mutating the * display and not reading it as no logical state should be encoded in the * display of elements. */ /* Slow implementation for browsers that don't natively support .matches() */ function matchesSelector_SLOW(element, selector) { let root = element; while (root.parentNode) { root = root.parentNode; } const all = root.querySelectorAll(selector); return Array.prototype.indexOf.call(all, element) !== -1; } const CSSCore = { /** * Adds the class passed in to the element if it doesn't already have it. * * @param {DOMElement} element the element to set the class on * @param {string} className the CSS className * @return {DOMElement} the element passed in */ addClass: function(element, className) { invariant( !/\s/.test(className), 'CSSCore.addClass takes only a single class name. "%s" contains ' + 'multiple classes.', className ); if (className) { if (element.classList) { element.classList.add(className); } else if (!CSSCore.hasClass(element, className)) { element.className = element.className + ' ' + className; } } return element; }, /** * Removes the class passed in from the element * * @param {DOMElement} element the element to set the class on * @param {string} className the CSS className * @return {DOMElement} the element passed in */ removeClass: function(element, className) { invariant( !/\s/.test(className), 'CSSCore.removeClass takes only a single class name. "%s" contains ' + 'multiple classes.', className ); if (className) { if (element.classList) { element.classList.remove(className); } else if (CSSCore.hasClass(element, className)) { element.className = element.className .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1') .replace(/\s+/g, ' ') // multiple spaces to one .replace(/^\s*|\s*$/g, ''); // trim the ends } } return element; }, /** * Helper to add or remove a class from an element based on a condition. * * @param {DOMElement} element the element to set the class on * @param {string} className the CSS className * @param {*} bool condition to whether to add or remove the class * @return {DOMElement} the element passed in */ conditionClass: function(element, className, bool) { return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); }, /** * Tests whether the element has the class specified. * * @param {DOMNode|DOMWindow} element the element to check the class on * @param {string} className the CSS className * @return {boolean} true if the element has the class, false if not */ hasClass: function(element, className) { invariant( !/\s/.test(className), 'CSS.hasClass takes only a single class name.' ); if (element.classList) { return !!className && element.classList.contains(className); } return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; }, /** * Tests whether the element matches the selector specified * * @param {DOMNode|DOMWindow} element the element that we are querying * @param {string} selector the CSS selector * @return {boolean} true if the element matches the selector, false if not */ matchesSelector: function(element, selector) { const matchesImpl = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.msMatchesSelector || (s => matchesSelector_SLOW(element, s)); return matchesImpl.call(element, selector); }, }; module.exports = CSSCore; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/Deferred.js000066400000000000000000000040671335022644200220530ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Deferred * @typechecks * @flow */ /** * Deferred provides a Promise-like API that exposes methods to resolve and * reject the Promise. It is most useful when converting non-Promise code to use * Promises. * * If you want to export the Promise without exposing access to the resolve and * reject methods, you should export `getPromise` which returns a Promise with * the same semantics excluding those methods. */ class Deferred { _settled: boolean; _promise: Promise; _resolve: (value: Tvalue) => void; _reject: (reason: Treason) => void; constructor() { this._settled = false; this._promise = new Promise((resolve, reject) => { this._resolve = (resolve: any); this._reject = (reject: any); }); } getPromise(): Promise { return this._promise; } resolve(value: Tvalue): void { this._settled = true; this._resolve(value); } reject(reason: Treason): void { this._settled = true; this._reject(reason); } catch( onReject?: ?(error: any) => mixed ): Promise { return Promise.prototype.catch.apply(this._promise, arguments); } then( onFulfill?: ?(value: any) => mixed, onReject?: ?(error: any) => mixed ): Promise { return Promise.prototype.then.apply(this._promise, arguments); } done( onFulfill?: ?(value: any) => mixed, onReject?: ?(error: any) => mixed ): void { // Embed the polyfill for the non-standard Promise.prototype.done so that // users of the open source fbjs don't need a custom lib for Promise const promise = arguments.length ? this._promise.then.apply(this._promise, arguments) : this._promise; promise.then(undefined, function(err) { setTimeout(function() { throw err; }, 0); }); } isSettled(): boolean { return this._settled; } } module.exports = Deferred; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/ExecutionEnvironment.js000066400000000000000000000017401335022644200245160ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule ExecutionEnvironment */ 'use strict'; const canUseDOM = !!( typeof window !== 'undefined' && window.document && window.document.createElement ); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ const ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/Keys.js000066400000000000000000000011361335022644200212400ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Keys */ module.exports = { BACKSPACE: 8, TAB: 9, RETURN: 13, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46, COMMA: 188, PERIOD: 190, A: 65, Z: 90, ZERO: 48, NUMPAD_0: 96, NUMPAD_9: 105 }; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/PromiseMap.js000066400000000000000000000026501335022644200224030ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule PromiseMap * @flow */ 'use strict'; const Deferred = require('Deferred'); const invariant = require('invariant'); /** * A map of asynchronous values that can be get or set in any order. Unlike a * normal map, setting the value for a particular key more than once throws. * Also unlike a normal map, a key can either be resolved or rejected. */ class PromiseMap { _deferred: {[key:string]: Deferred}; constructor() { this._deferred = {}; } get(key: string): Promise { return getDeferred(this._deferred, key).getPromise(); } resolveKey(key: string, value: Tvalue): void { const entry = getDeferred(this._deferred, key); invariant(!entry.isSettled(), 'PromiseMap: Already settled `%s`.', key); entry.resolve(value); } rejectKey(key: string, reason: Treason): void { const entry = getDeferred(this._deferred, key); invariant(!entry.isSettled(), 'PromiseMap: Already settled `%s`.', key); entry.reject(reason); } } function getDeferred( entries: {[key: string]: Deferred}, key: string ): Deferred { if (!entries.hasOwnProperty(key)) { entries[key] = new Deferred(); } return entries[key]; } module.exports = PromiseMap; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/TouchEventUtils.js000066400000000000000000000021711335022644200234320ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule TouchEventUtils */ const TouchEventUtils = { /** * Utility function for common case of extracting out the primary touch from a * touch event. * - `touchEnd` events usually do not have the `touches` property. * http://stackoverflow.com/questions/3666929/ * mobile-sarai-touchend-event-not-firing-when-last-touch-is-removed * * @param {Event} nativeEvent Native event that may or may not be a touch. * @return {TouchesObject?} an object with pageX and pageY or null. */ extractSingleTouch: function(nativeEvent) { const touches = nativeEvent.touches; const changedTouches = nativeEvent.changedTouches; const hasTouches = touches && touches.length > 0; const hasChangedTouches = changedTouches && changedTouches.length > 0; return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent; } }; module.exports = TouchEventUtils; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/000077500000000000000000000000001335022644200217245ustar00rootroot00000000000000fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/PromiseMap-test.js000066400000000000000000000057331335022644200253230ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ /*eslint-disable fb-www/promise-termination */ 'use strict'; const PromiseMap = require('PromiseMap'); describe('PromiseMap', () => { beforeEach(() => { jest.resetModuleRegistry(); }); it('can get a value after resolving it', () => { const map = new PromiseMap(); map.resolveKey('foo', 42); map.resolveKey('bar', 1337); return Promise.resolve() .then(() => map.get('foo')) .then(fooValue => expect(fooValue).toEqual(42)) .then(() => map.get('bar')) .then(barValue => expect(barValue).toEqual(1337)); }); it('can get a value before resolving it', () => { const map = new PromiseMap(); const ret = Promise.resolve() .then(() => map.get('foo')) .then(fooValue => expect(fooValue).toEqual(42)) .then(() => map.get('bar')) .then(barValue => expect(barValue).toEqual(1337)); map.resolveKey('foo', 42); map.resolveKey('bar', 1337); return ret; }); it('can get an error after rejecting it', () => { const map = new PromiseMap(); map.rejectKey('foo', 42); map.rejectKey('bar', 1337); return Promise.resolve() .then(() => map.get('foo')) .catch(fooValue => expect(fooValue).toEqual(42)) .then(() => map.get('bar')) .catch(barValue => expect(barValue).toEqual(1337)); }); it('can get an error before rejecting it', () => { const map = new PromiseMap(); const ret = Promise.resolve() .then(() => map.get('foo')) .catch(fooValue => expect(fooValue).toEqual(42)) .then(() => map.get('bar')) .catch(barValue => expect(barValue).toEqual(1337)); map.rejectKey('foo', 42); map.rejectKey('bar', 1337); return ret; }); it('throws if the same key is resolved more than once', () => { const map = new PromiseMap(); map.resolveKey('foo', 42); expect(() => { map.resolveKey('foo', 1337); }).toThrowError('PromiseMap: Already settled `foo`.'); return Promise.resolve() .then(() => map.get('foo')) .then(fooValue => expect(fooValue).toEqual(42)); }); it('throws if the same key is rejected more than once', () => { const map = new PromiseMap(); map.rejectKey('foo', 42); expect(() => { map.rejectKey('foo', 1337); }).toThrowError('PromiseMap: Already settled `foo`.'); return Promise.resolve() .then(() => map.get('foo')) .catch(fooValue => expect(fooValue).toEqual(42)); }); it('throws if the same key is both rejected and resolved', () => { const map = new PromiseMap(); map.resolveKey('foo', 42); expect(() => { map.rejectKey('foo', 1337); }).toThrowError('PromiseMap: Already settled `foo`.'); return Promise.resolve() .then(() => map.get('foo')) .then(fooValue => expect(fooValue).toEqual(42)); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/areEqual-test.js000066400000000000000000000447611335022644200250120ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ 'use strict'; jest.unmock('areEqual'); const areEqual = require('areEqual'); describe('areEqual', function() { function First() { this.value = 1; } First.prototype.value = 1; function Second() { this.value = 1; } Second.prototype.value = 2; it('works with basic equality and identity comparisons', () => { // `null` is equal to `null` expect(areEqual(null, null)).toBe(true); // `undefined` is equal to `undefined` expect(areEqual()).toBe(true); // `0` is not equal to `-0` expect(areEqual(0, -0)).toBe(false); // Commutative equality is implemented for `0` and `-0` expect(areEqual(-0, 0)).toBe(false); // `null` is not equal to `undefined` expect(areEqual(null, undefined)).toBe(false); // Commutative equality is implemented for `null` and `undefined` expect(areEqual(undefined, null)).toBe(false); }); it('works with string object and primitive comparisons', () => { // Identical string primitives are equal expect(areEqual('Curly', 'Curly')).toBe(true); // String objects with identical primitive values are equal expect(areEqual(String('Curly'), String('Curly'))).toBe(true); // String primitives and their corresponding object wrappers are equal expect(areEqual(String('Curly'), 'Curly')).toBe(true); // Commutative equality is implemented for string objects and primitives expect(areEqual('Curly', String('Curly'))).toBe(true); // String primitives with different values are not equal expect(areEqual('Curly', 'Larry')).toBe(false); // String objects with different primitive values are not equal expect(areEqual(String('Curly'), String('Larry'))).toBe(false); // String objects and objects with a custom `toString` method are not equal expect(areEqual(String('Curly'), {toString() { return 'Curly'; }})) .toBe(false); }); it('works with number object and primitive comparisons.', () => { // Identical number primitives are equal expect(areEqual(75, 75)).toBe(true); // Number objects with identical primitive values are equal expect(areEqual(Number(75), Number(75))).toBe(true); // Number primitives and their corresponding object wrappers are equal expect(areEqual(75, Number(75))).toBe(true); // Commutative equality is implemented for number objects and primitives expect(areEqual(Number(75), 75)).toBe(true); // `new Number(0)` and `-0` are not equal expect(areEqual(Number(0), -0)).toBe(false); // Commutative equality is implemented for `new Number(0)` and `-0` expect(areEqual(0, Number(-0))).toBe(false); // Number objects with different primitive values are not equal expect(areEqual(Number(75), Number(63))).toBe(false); // Number objects and objects with a `valueOf` method are not equal expect(areEqual(Number(63), {valueOf: function() { return 63; }})) .toBe(false); }); it('works with comparisons involving `NaN`', () => { // `NaN` is equal to `NaN` expect(areEqual(NaN, NaN)).toBe(false); // A number primitive is not equal to `NaN` expect(areEqual(61, NaN)).toBe(false); // A number object is not equal to `NaN` expect(areEqual(Number(79), NaN)).toBe(false); // `Infinity` is not equal to `NaN` expect(areEqual(Infinity, NaN)).toBe(false); }); it('works with boolean object and primitive comparisons', () => { // Identical boolean primitives are equal expect(areEqual(true, true)).toBe(true); // Boolean objects with identical primitive values are equal expect(areEqual(Boolean(), Boolean())).toBe(true); // Boolean primitives and their corresponding object wrappers are equal expect(areEqual(true, Boolean(true))).toBe(true); // Commutative equality is implemented for booleans expect(areEqual(Boolean(true), true)).toBe(true); // Boolean objects with different primitive values are not equal expect(areEqual(Boolean(true), Boolean())).toBe(false); }); it('works with common type coercion', () => { // Boolean objects are not equal to the boolean primitive `true` expect(areEqual(true, Boolean(false))).toBe(false); // String and number primitives with like values are not equal expect(areEqual('75', 75)).toBe(false); // String and number objects with like values are not equal expect(areEqual(Number(63), String(63))).toBe(false); // Commutative equality is implemented for like string and number values expect(areEqual(75, '75')).toBe(false); // Number and string primitives with like values are not equal expect(areEqual(0, '')).toBe(false); // Number and boolean primitives with like values are not equal expect(areEqual(1, true)).toBe(false); // Boolean and number objects with like values are not equal expect(areEqual(Boolean(false), Number(0))).toBe(false); // Boolean primitives and string objects with like values are not equal expect(areEqual(false, String(''))).toBe(false); // Dates and their corresponding numeric primitive values are not equal expect(areEqual(12564504e5, new Date(2009, 9, 25))).toBe(false); }); it('works with dates', () => { // Date objects referencing identical times are equal expect(areEqual(new Date(2009, 9, 25), new Date(2009, 9, 25))) .toBe(true); // Date objects referencing different times are not equal expect(areEqual(new Date(2009, 9, 25), new Date(2009, 11, 13))) .toBe(false); // Date objects and objects with a `getTime` method are not equal expect(areEqual(new Date(2009, 11, 13), { getTime: function() { return 12606876e5; } })).toBe(false); // Invalid dates are not equal expect(areEqual(new Date('Curly'), new Date('Curly'))).toBe(false); }); it('works with functions', () => { // Different functions with identical bodies and source code // representations are not equal expect(areEqual(First, Second)).toBe(false); }); it('works with regular expressions', () => { // RegExps with equivalent patterns and flags are equal expect(areEqual(/(?:)/gim, /(?:)/gim)).toBe(true); // RegExps with equivalent patterns and different flags are not equal expect(areEqual(/(?:)/g, /(?:)/gi)).toBe(false); // RegExps with different patterns and equivalent flags are not equal expect(areEqual(/Moe/gim, /Curly/gim)).toBe(false); // Commutative equality is implemented for RegExps expect(areEqual(/(?:)/gi, /(?:)/g)).toBe(false); // RegExps and RegExp-like objects are not equal expect(areEqual(/Curly/g, {source: 'Larry', global: true, ignoreCase: false, multiline: false})) .toBe(false); }); it('works with empty arrays, array-like objects, and object literals', function() { // Empty object literals are equal expect(areEqual({}, {})).toBe(true); // Empty array literals are equal expect(areEqual([], [])).toBe(true); // Empty nested arrays and objects are equal expect(areEqual([{}], [{}])).toBe(true); // Array-like objects and arrays are not equal expect(areEqual({length: 0}, [])).toBe(false); // Commutative equality is implemented for array-like objects expect(areEqual([], {length: 0})).toBe(false); // Object literals and array literals are not equal expect(areEqual({}, [])).toBe(false); // Commutative equality is implemented for objects and arrays expect(areEqual([], {})).toBe(false); }); it('works with arrays containing primitive and object values', function() { // Arrays containing identical primitives are equal expect(areEqual([1, 'Larry', true], [1, 'Larry', true])).toBe(true); // Arrays containing equivalent elements are equal expect(areEqual([(/Moe/g), new Date(2009, 9, 25)], [(/Moe/g), new Date(2009, 9, 25)])).toBe(true); }); it('works with multidimentional arrays', () => { const a = [Number(47), false, 'Larry', /Moe/, new Date(2009, 11, 13), ['running', 'biking', String('programming')], {a: 47}]; const b = [Number(47), false, 'Larry', /Moe/, new Date(2009, 11, 13), ['running', 'biking', String('programming')], {a: 47}]; const c = [Number(47), false, 'Larry', /Moe/, new Date(2009, 11, 13), ['running', 'biking', String('programming')], [32]]; // Arrays containing nested arrays and objects are recursively compared expect(areEqual(a, b)).toBe(true); expect(areEqual(a, c)).toBe(false); // Arrays containing equivalent elements and different non-numeric // properties are equal expect(areEqual(a, b)).toBe(true); a.push('White Rocks'); // Arrays of different lengths are not equal expect(areEqual(a, b)).toBe(false); a.push('East Boulder'); b.push('Gunbarrel Ranch', 'Teller Farm'); // Arrays of identical lengths containing different elements are not equal expect(areEqual(a, b)).toBe(false); }); it('works with sparse arrays', () => { // Sparse arrays of identical lengths are equal expect(areEqual(Array(3), Array(3))).toBe(true); // Sparse arrays of different lengths are not equal when both are empty expect(areEqual(Array(3), Array(6))).toBe(false); }); it('works with simple objects', function() { // Objects containing identical primitives are equal expect(areEqual({a: 'Curly', b: 1, c: true}, {a: 'Curly', b: 1, c: true})) .toBe(true); // Objects containing equivalent members are equal expect(areEqual({b: new Date(2009, 11, 13)}, {b: new Date(2009, 11, 13)})) .toBe(true); expect(areEqual({a: /Curly/g}, {a: /Curly/g})).toBe(true); expect(areEqual({a: /Curly/g}, {b: /Curly/g})).toBe(false); expect(areEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)})).toBe(true); expect(areEqual({a: 1}, {b: 2})).toBe(false); // Objects of identical sizes with different values are not equal expect(areEqual({a: 63, b: 75}, {a: 61, b: 55})).toBe(false); // Objects of identical sizes with different property names are not equal expect(areEqual({a: 63, b: 75}, {a: 61, c: 55})).toBe(false); // Objects of different sizes are not equal expect(areEqual({a: 1, b: 2}, {a: 1})).toBe(false); // Commutative equality is implemented for objects expect(areEqual({a: 1}, {a: 1, b: 2})).toBe(false); // Objects with identical keys and different values are not equivalent expect(areEqual({x: 1, z: 3}, {x: 1, z: 2})).toBe(false); // `A` contains nested objects and arrays. var a = { name: String('Moe Howard'), age: Number(77), stooge: true, hobbies: ['acting'], film: { name: 'Sing a Song of Six Pants', release: new Date(1947, 9, 30), stars: [String('Larry Fine'), 'Shemp Howard'], minutes: Number(16), seconds: 54 } }; // `B` contains equivalent nested objects and arrays. var b = { name: String('Moe Howard'), age: Number(77), stooge: true, hobbies: ['acting'], film: { name: 'Sing a Song of Six Pants', release: new Date(1947, 9, 30), stars: [String('Larry Fine'), 'Shemp Howard'], minutes: Number(16), seconds: 54 } }; // Objects with nested equivalent members are recursively compared expect(areEqual(a, b)).toBe(true); b.hobbies = ['swimming']; expect(areEqual(a, b)).toBe(false); }); it('works with instances', () => { function First() { this.value = 1; } First.prototype.value = 1; function Second() { this.value = 1; } Second.prototype.value = 2; // Object instances are equal expect(areEqual(new First(), new First())).toBe(true); // Objects with different constructors and identical own properties // are not equal expect(areEqual(new First(), new Second())).toBe(false); // Object instances and objects sharing equivalent properties // are not equal expect(areEqual({value: 1}, new First())).toBe(false); // The prototype chain of objects should not be examined expect(areEqual({value: 2}, new Second())).toBe(false); }); it('works with circular arrays', () => { let a, b; (a = []).push(a); (b = []).push(b); // Arrays containing circular references are equal expect(areEqual(a, b)).toBe(true); a.push(String('Larry')); b.push(String('Larry')); // Arrays containing circular references and equivalent properties // are equal expect(areEqual(a, b)).toBe(true); a.push('Shemp'); b.push('Curly'); // Arays containing circular references and different properties // are not equal expect(areEqual(a, b)).toBe(false); a = ['everything is checked but', 'this', 'is not']; a[1] = a; b = ['everything is checked but', ['this', 'array'], 'is not']; // Comparison of circular references with non-circular references // are not equal expect(areEqual(a, b)).toBe(false); }); it('works with circular objects', () => { let a, b; a = {abc: null}; b = {abc: null}; a.abc = a; b.abc = b; // Objects containing circular references are equal expect(areEqual(a, b)).toBe(true); a.def = 75; b.def = 75; // Objects containing circular references and equivalent properties // are equal expect(areEqual(a, b)).toBe(true); a.def = Number(75); b.def = Number(63); // Objects containing circular references and different properties // are not equal expect(areEqual(a, b)).toBe(false); a = {everything: 'is checked', but: 'this', is: 'not'}; a.but = a; b = {everything: 'is checked', but: {that:'object'}, is: 'not'}; // Comparison of circular references with non-circular object references // are not equal expect(areEqual(a, b)).toBe(false); }); it('works with all sorts of cyclic structures', () => { let a, b; a = [{abc: null}]; b = [{abc: null}]; (a[0].abc = a).push(a); (b[0].abc = b).push(b); // Cyclic structures are equal expect(areEqual(a, b)).toBe(true); a[0].def = 'Larry'; b[0].def = 'Larry'; // Cyclic structures containing equivalent properties are equal expect(areEqual(a, b)).toBe(true); a[0].def = String('Larry'); b[0].def = String('Curly'); // Cyclic structures containing different properties are not equal expect(areEqual(a, b)).toBe(false); }); it('works using object implementing `valueOf`', () => { class Vector { constructor(x, y) { this.x = x; this.y = y; this.valueOf = this.valueOf; } valueOf() { return this.x + this.y; } } const v1 = new Vector(1, 4); const v2 = new Vector(2, 3); expect(areEqual(v1, v2)).toBe(true); const v3 = new Vector(1, 5); expect(areEqual(v1, v3)).toBe(false); }); it('works with primitives', () => { expect(areEqual(1, 1)).toBe(true); expect(areEqual(3.14, 3)).toBe(false); expect(areEqual('a', 'a')).toBe(true); expect(areEqual('a', 'b')).toBe(false); expect(areEqual(true, true)).toBe(true); expect(areEqual(true, false)).toBe(false); // We should support Regex and Date Type expect(areEqual(/a/, /a/)).toBe(true); expect(areEqual(/a/, /b/)).toBe(false); expect(areEqual(/a/i, /a/)).toBe(false); expect(areEqual(/a/g, /a/)).toBe(false); expect(areEqual(/a/m, /a/)).toBe(false); expect(areEqual(new Date(1000), new Date(1000))).toBe(true); expect(areEqual(new Date(1000), new Date(2000))).toBe(false); }); it('works with null or undefined', () => { expect(areEqual(null, null)).toBe(true); expect(areEqual(undefined, undefined)).toBe(true); // But this should be false expect(areEqual(null, undefined)).toBe(false); }); it('should compare two equal arrays and return true', () => { expect(areEqual([1, 2, 3], [1, 2, 3])).toBe(true); expect(areEqual(['a', 'b', 'c'], ['a', 'b', 'c'])).toBe(true); }); it('should be false on arrays with values in different order ', () => { const a = [3, 2, 1]; const b = [2, 3, 1]; expect(areEqual(a, b)).toBe(false); // See if they actually contain the same values a.sort(); b.sort(); expect(areEqual(a, b)).toBe(true); }); it('should only work with equal values and equal types', () => { const a = [1, '2', 3]; const b = [1, 2, 3]; expect(areEqual(a, b)).toBe(false); }); it('should be true on empty arrays', () => { expect(areEqual([], [])).toBe(true); }); it('should be false on arrays with different length', () => { const a = [1, 2]; const b = [3]; expect(areEqual(a, b)).toBe(false); expect(areEqual(b, a)).toBe(false); }); it('should be true if an array contains equal objects', () => { const object = {}; const div = document.createElement('div'); const a = [object, div, window]; const b = [object, div, window]; expect(areEqual(a, b)).toBe(true); }); it('should be true on null or undefined values', () => { const a = [null, 1, undefined]; const b = [null, 1, undefined]; expect(areEqual(a, b)).toBe(true); }); it('should compare two equal objects and return true', () => { let a = {a: 1, b: 2, c: 3}; var b = {a: 1, b: 2, c: 3}; expect(areEqual(a, b)).toBe(true); a = {'1': 'a', '2': 'b', '3': 'c'}; b = {'1': 'a', '2': 'b', '3': 'c'}; expect(areEqual(a, b)).toBe(true); }); it('should compare two objects with random key order', () => { const a = {a: 1, c: 3, b: 2}; var b = {c: 3, b: 2, a: 1}; expect(areEqual(a, b)).toBe(true); }); it('should be false on array-like inputs', () => { const a = [1, 2, 3]; const b = [1, 2, 3]; const arraylike = {'0': 1, '1': 2, '2': 3, length: 3}; const arraylikeB = {'0': 1, '1': 2, '2': 3, length: 3}; expect(areEqual(a, arraylike)).toBe(false); expect(areEqual(arraylike, a)).toBe(false); expect(areEqual(a, b)).toBe(true); expect(areEqual(arraylike, arraylikeB)).toBe(true); }); it('works with deep equality checks', () => { const a = {array: [1, 2, 3, {a: '1', b: [1, 2, 5]}]}; var b = {array: [1, 2, 3, {a: '1', b: [1, 2, 5]}]}; expect(areEqual(a, b)).toBe(true); b.array[3] = a.array[3]; expect(areEqual(a, b)).toBe(true); }); it('works with values where triple-equals returns true', () => { const div = document.createElement('div'); const a = { a: null, b: undefined, c: window, d: div, e: true, f: 'string', g: 42 }; var b = { c: window, b: undefined, g: 42, d: div, f: 'string', a: null, e: true }; expect(areEqual(a, b)).toBe(true); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/debounceCore-test.js000066400000000000000000000047631335022644200256460ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ jest .unmock('debounceCore'); const debounce = require('debounceCore'); describe('debounceCore', function() { let func1; const BUFFER = 10; beforeEach(function() { jest.resetModuleRegistry(); func1 = jest.fn(); }); function argsEquivalent(args1, args2) { for (let i = 0; i < Math.max(args1.length, args2.length); i++) { if (args1[i] != args2[i]) { return false; } } return true; } function assertCalledWith() { const args = [].slice.call(arguments); expect( func1.mock.calls.some(function(call) { return argsEquivalent(args, call); }) ).toBeTruthy(); } it('should not call until the wait is over', function() { const wait = 200; const debounced = debounce(func1, wait); debounced(1, 'a'); expect(func1).not.toBeCalled(); mockRunTimersToTime(wait + BUFFER); assertCalledWith(1, 'a'); // make sure that subsequent function isn't called right away debounced(2, 'a'); expect(func1.mock.calls.length).toBe(1); mockClearTimers(); }); it('should only call the last function per batch', function() { const wait = 200; const debounced = debounce(func1, wait); debounced(1, 'a'); expect(func1).not.toBeCalled(); mockRunTimersToTime(100); debounced(2, 'a'); mockRunTimersToTime(100); debounced(3, 'a'); mockRunTimersToTime(100); debounced(4, 'a'); mockRunTimersToTime(100); debounced(5, 'a'); expect(mockGetTimersCount()).toBe(1); mockRunTimersToTime(wait + BUFFER); assertCalledWith(5, 'a'); debounced(6, 'a'); debounced(7, 'a'); mockRunTimersToTime(wait + BUFFER); assertCalledWith(7, 'a'); expect(func1.mock.calls.length).toBe(2); }); it('should allow setting a custom setTimeout function', function() { const setTimeoutFunc = jest.fn(); const wait = 200; const debounced = debounce(func1, wait, null, setTimeoutFunc); debounced(1, 'a'); debounced(2, 'a'); expect(setTimeoutFunc.mock.calls.length).toBe(2); }); it('should be reset-able', function() { const wait = 300; const debounced = debounce(func1, wait); debounced(1, 'a'); debounced.reset(); expect(mockGetTimersCount()).toBe(0); mockRunTimersRepeatedly(); expect(func1).not.toBeCalled(); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/isEmpty-test.js000066400000000000000000000027101335022644200246710ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ jest.mock('_shouldPolyfillES6Collection'); const Map = require('Map'); const Set = require('Set'); const isEmpty = require('isEmpty'); const _shouldPolyfillES6Collection = require('_shouldPolyfillES6Collection'); describe('isEmpty', () => { it('should return true for empty supported types', () => { expect(isEmpty(undefined)).toBe(true); expect(isEmpty(null)).toBe(true); expect(isEmpty(false)).toBe(true); expect(isEmpty(0)).toBe(true); expect(isEmpty('')).toBe(true); expect(isEmpty([])).toBe(true); expect(isEmpty({})).toBe(true); expect(isEmpty(Object.create(null))).toBe(true); }); it('should return false for non-empty supported types', () => { expect(isEmpty(1)).toBe(false); expect(isEmpty('0')).toBe(false); expect(isEmpty([1])).toBe(false); expect(isEmpty({a: 1})).toBe(false); }); it('should not allow maps and sets', () => { // Ensure that `Map` and `Set` use non-native polyfills _shouldPolyfillES6Collection.mockReturnValue(true); // Polyfilled expect(() => isEmpty(new Map())).toThrow(); expect(() => isEmpty(new Set())).toThrow(); // Native expect(() => isEmpty(new global.Map())).toThrow(); expect(() => isEmpty(new global.Set())).toThrow(); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/joinClasses-test.js000066400000000000000000000022631335022644200255170ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ 'use strict'; jest.unmock('joinClasses'); const joinClasses = require('joinClasses'); describe('joinClasses', function() { it('should return a single className', function() { expect(joinClasses('aaa')).toEqual('aaa'); }); it('should join two classes together', function() { const aaa = 'aaa'; const bbb = 'bbb'; expect(joinClasses(aaa, bbb)).toEqual('aaa bbb'); }); it('should join many classes together', function() { const aaa = 'aaa'; const bbb = 'bbb'; const ccc = 'ccc'; const ddd = 'ddd'; const eee = 'eee'; expect(joinClasses(aaa, bbb, ccc, ddd, eee)).toEqual('aaa bbb ccc ddd eee'); }); it('should omit undefined and empty classes', function() { const aaa = 'aaa'; let bbb; const ccc = null; const ddd = ''; const eee = 'eee'; expect(joinClasses(bbb)).toEqual(''); expect(joinClasses(bbb, bbb, bbb)).toEqual(''); expect(joinClasses(aaa, bbb, ccc, ddd, eee)).toEqual('aaa eee'); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/memoizeStringOnly-test.js000066400000000000000000000012051335022644200267330ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ 'use strict'; describe('memoizeStringOnly', function() { let memoizeStringOnly; beforeEach(function() { jest.resetModuleRegistry(); memoizeStringOnly = require('memoizeStringOnly'); }); it('should be transparent to callers', function() { const callback = function(string) { return string; }; const memoized = memoizeStringOnly(callback); expect(memoized('foo'), callback('foo')); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/shallowEqual-test.js000066400000000000000000000040421335022644200257000ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core */ 'use strict'; jest.unmock('shallowEqual'); const shallowEqual = require('shallowEqual'); describe('shallowEqual', () => { it('returns false if either argument is null', () => { expect(shallowEqual(null, {})).toBe(false); expect(shallowEqual({}, null)).toBe(false); }); it('returns true if both arguments are null or undefined', () => { expect(shallowEqual(null, null)).toBe(true); expect(shallowEqual(undefined, undefined)).toBe(true); }); it('returns true if arguments are not objects and are equal', () => { expect(shallowEqual(1, 1)).toBe(true); }); it('returns true if arguments are shallow equal', () => { expect( shallowEqual( {a: 1, b: 2, c: 3}, {a: 1, b: 2, c: 3} ) ).toBe(true); }); it('returns true when comparing NaN', () => { expect(shallowEqual(NaN, NaN)).toBe(true); expect( shallowEqual( {a: 1, b: 2, c: 3, d: NaN}, {a: 1, b: 2, c: 3, d: NaN} ) ).toBe(true); }); it('returns false if arguments are not objects and not equal', () => { expect( shallowEqual( 1, 2 ) ).toBe(false); }); it('returns false if only one argument is not an object', () => { expect( shallowEqual( 1, {} ) ).toBe(false); }); it('returns false if first argument has too many keys', () => { expect( shallowEqual( {a: 1, b: 2, c: 3}, {a: 1, b: 2} ) ).toBe(false); }); it('returns false if second argument has too many keys', () => { expect( shallowEqual( {a: 1, b: 2}, {a: 1, b: 2, c: 3} ) ).toBe(false); }); it('returns false if arguments are not shallow equal', () => { expect( shallowEqual( {a: 1, b: 2, c: {}}, {a: 1, b: 2, c: {}} ) ).toBe(false); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/__tests__/sprintf-test.js000066400000000000000000000007011335022644200247220ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+jsinfra */ jest .unmock('sprintf'); const sprintf = require('sprintf'); describe('sprintf', function() { it('works with %s', function() { expect(sprintf('aaa %s bbb %s ccc', '111', '222')) .toBe('aaa 111 bbb 222 ccc'); }); }); fbjs-fbjs-v1.0.0/packages/fbjs/src/core/_shouldPolyfillES6Collection.js000066400000000000000000000025721335022644200260340ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule _shouldPolyfillES6Collection * @preventMunge * @flow */ /** * Checks whether a collection name (e.g. "Map" or "Set") has a native polyfill * that is safe to be used. */ function shouldPolyfillES6Collection(collectionName: string): boolean { const Collection = global[collectionName]; if (Collection == null) { return true; } // The iterator protocol depends on `Symbol.iterator`. If a collection is // implemented, but `Symbol` is not, it's going to break iteration because // we'll be using custom "@@iterator" instead, which is not implemented on // native collections. if (typeof global.Symbol !== 'function') { return true; } const proto = Collection.prototype; // These checks are adapted from es6-shim: https://fburl.com/34437854 // NOTE: `isCallableWithoutNew` and `!supportsSubclassing` are not checked // because they make debugging with "break on exceptions" difficult. return Collection == null || typeof Collection !== 'function' || typeof proto.clear !== 'function' || new Collection().size !== 0 || typeof proto.keys !== 'function' || typeof proto.forEach !== 'function'; } module.exports = shouldPolyfillES6Collection; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/areEqual.js000066400000000000000000000055161335022644200220720ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule areEqual * @flow */ const aStackPool = []; const bStackPool = []; /** * Checks if two values are equal. Values may be primitives, arrays, or objects. * Returns true if both arguments have the same keys and values. * * @see http://underscorejs.org * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. * @license MIT */ function areEqual(a: any, b: any): boolean { const aStack = aStackPool.length ? aStackPool.pop() : []; const bStack = bStackPool.length ? bStackPool.pop() : []; const result = eq(a, b, aStack, bStack); aStack.length = 0; bStack.length = 0; aStackPool.push(aStack); bStackPool.push(bStack); return result; } function eq(a: any, b: any, aStack: Array, bStack: Array): boolean { if (a === b) { // Identical objects are equal. `0 === -0`, but they aren't identical. return a !== 0 || 1 / a == 1 / b; } if (a == null || b == null) { // a or b can be `null` or `undefined` return false; } if (typeof a != 'object' || typeof b != 'object') { return false; } const objToStr = Object.prototype.toString; const className = objToStr.call(a); if (className != objToStr.call(b)) { return false; } switch (className) { case '[object String]': return a == String(b); case '[object Number]': return isNaN(a) || isNaN(b) ? false : a == Number(b); case '[object Date]': case '[object Boolean]': return +a == +b; case '[object RegExp]': return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; } // Assume equality for cyclic structures. let length = aStack.length; while (length--) { if (aStack[length] == a) { return bStack[length] == b; } } aStack.push(a); bStack.push(b); let size = 0; // Recursively compare objects and arrays. if (className === '[object Array]') { size = a.length; if (size !== b.length) { return false; } // Deep compare the contents, ignoring non-numeric properties. while (size--) { if (!eq(a[size], b[size], aStack, bStack)) { return false; } } } else { if (a.constructor !== b.constructor) { return false; } if (a.hasOwnProperty('valueOf') && b.hasOwnProperty('valueOf')) { return a.valueOf() == b.valueOf(); } const keys = Object.keys(a); if (keys.length != Object.keys(b).length) { return false; } for (let i = 0; i < keys.length; i++) { if (!eq(a[keys[i]], b[keys[i]], aStack, bStack)) { return false; } } } aStack.pop(); bStack.pop(); return true; } module.exports = areEqual; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/camelize.js000066400000000000000000000011251335022644200221140ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule camelize * @typechecks */ const _hyphenPattern = /-(.)/g; /** * Camelcases a hyphenated string, for example: * * > camelize('background-color') * < "backgroundColor" * * @param {string} string * @return {string} */ function camelize(string) { return string.replace(_hyphenPattern, function(_, character) { return character.toUpperCase(); }); } module.exports = camelize; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/camelizeStyleName.js000066400000000000000000000016231335022644200237410ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule camelizeStyleName * @typechecks */ 'use strict'; const camelize = require('camelize'); const msPattern = /^-ms-/; /** * Camelcases a hyphenated CSS property name, for example: * * > camelizeStyleName('background-color') * < "backgroundColor" * > camelizeStyleName('-moz-transition') * < "MozTransition" * > camelizeStyleName('-ms-transition') * < "msTransition" * * As Andi Smith suggests * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix * is converted to lowercase `ms`. * * @param {string} string * @return {string} */ function camelizeStyleName(string) { return camelize(string.replace(msPattern, 'ms-')); } module.exports = camelizeStyleName; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/cancelAnimationFramePolyfill.js000066400000000000000000000012431335022644200260770ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule cancelAnimationFramePolyfill */ /** * Here is the native and polyfill version of cancelAnimationFrame. * Please don't use it directly and use cancelAnimationFrame module instead. */ const cancelAnimationFrame = global.cancelAnimationFrame || global.webkitCancelAnimationFrame || global.mozCancelAnimationFrame || global.oCancelAnimationFrame || global.msCancelAnimationFrame || global.clearTimeout; module.exports = cancelAnimationFrame; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/clamp.js000066400000000000000000000007741335022644200214300ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule clamp * @flow * @typechecks */ /** * Clamps (or clips or confines) the value to be between min and max. */ function clamp(value: number, min: number, max: number): number { if (value < min) { return min; } if (value > max) { return max; } return value; } module.exports = clamp; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/createArrayFromMixed.js000066400000000000000000000073171335022644200244110ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule createArrayFromMixed * @typechecks */ const invariant = require('invariant'); /** * Convert array-like objects to arrays. * * This API assumes the caller knows the contents of the data type. For less * well defined inputs use createArrayFromMixed. * * @param {object|function|filelist} obj * @return {array} */ function toArray(obj) { const length = obj.length; // Some browsers builtin objects can report typeof 'function' (e.g. NodeList // in old versions of Safari). invariant( !Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function'), 'toArray: Array-like object expected' ); invariant( typeof length === 'number', 'toArray: Object needs a length property' ); invariant( length === 0 || (length - 1) in obj, 'toArray: Object should have keys for indices' ); invariant( typeof obj.callee !== 'function', 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.' ); // Old IE doesn't give collections access to hasOwnProperty. Assume inputs // without method will throw during the slice call and skip straight to the // fallback. if (obj.hasOwnProperty) { try { return Array.prototype.slice.call(obj); } catch (e) { // IE < 9 does not support Array#slice on collections objects } } // Fall back to copying key by key. This assumes all keys have a value, // so will not preserve sparsely populated inputs. const ret = Array(length); for (let ii = 0; ii < length; ii++) { ret[ii] = obj[ii]; } return ret; } /** * Perform a heuristic test to determine if an object is "array-like". * * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" * Joshu replied: "Mu." * * This function determines if its argument has "array nature": it returns * true if the argument is an actual array, an `arguments' object, or an * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). * * It will return false for other array-like objects like Filelist. * * @param {*} obj * @return {boolean} */ function hasArrayNature(obj) { return ( // not null/false !!obj && // arrays are objects, NodeLists are functions in Safari (typeof obj == 'object' || typeof obj == 'function') && // quacks like an array ('length' in obj) && // not window !('setInterval' in obj) && // no DOM node should be considered an array-like // a 'select' element has 'length' and 'item' properties on IE8 (typeof obj.nodeType != 'number') && ( // a real array Array.isArray(obj) || // arguments ('callee' in obj) || // HTMLCollection/NodeList ('item' in obj) ) ); } /** * Ensure that the argument is an array by wrapping it in an array if it is not. * Creates a copy of the argument if it is already an array. * * This is mostly useful idiomatically: * * var createArrayFromMixed = require('createArrayFromMixed'); * * function takesOneOrMoreThings(things) { * things = createArrayFromMixed(things); * ... * } * * This allows you to treat `things' as an array, but accept scalars in the API. * * If you need to convert an array-like object, like `arguments`, into an array * use toArray instead. * * @param {*} obj * @return {array} */ function createArrayFromMixed(obj) { if (!hasArrayNature(obj)) { return [obj]; } else if (Array.isArray(obj)) { return obj.slice(); } else { return toArray(obj); } } module.exports = createArrayFromMixed; fbjs-fbjs-v1.0.0/packages/fbjs/src/core/createNodesFromMarkup.js000066400000000000000000000046131335022644200245700ustar00rootroot00000000000000/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule createNodesFromMarkup * @typechecks */ /*eslint-disable fb-www/unsafe-html*/ const ExecutionEnvironment = require('ExecutionEnvironment'); const createArrayFromMixed = require('createArrayFromMixed'); const getMarkupWrap = require('getMarkupWrap'); const invariant = require('invariant'); /** * Dummy container used to render all markup. */ const dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; /** * Pattern used by `getNodeName`. */ const nodeNamePattern = /^\s*<(\w+)/; /** * Extracts the `nodeName` of the first element in a string of markup. * * @param {string} markup String of markup. * @return {?string} Node name of the supplied markup. */ function getNodeName(markup) { const nodeNameMatch = markup.match(nodeNamePattern); return nodeNameMatch && nodeNameMatch[1].toLowerCase(); } /** * Creates an array containing the nodes rendered from the supplied markup. The * optionally supplied `handleScript` function will be invoked once for each *