mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
* WIP * fbjs support * WIP * dev/prod mode WIP * More WIP * builds a cjs bundle * adding forwarding modules * more progress on forwarding modules and FB config * improved how certain modules get inlined for fb and cjs * more forwarding modules * added comments to the module aliasing code * made ReactPerf and ReactTestUtils bundle again * Use -core suffix for all bundles This makes it easier to override things in www. * Add a lazy shim for ReactPerf This prevents a circular dependency between ReactGKJSModule and ReactDOM * Fix forwarding module for ReactCurrentOwner * Revert "Add a lazy shim for ReactPerf" This reverts commit 723b402c07116a70ce8ff1e43a1f4d92052e8f43. * Rename -core suffix to -fb for clarity * Change forwarding modules to import from -fb This is another, more direct fix for ReactPerf circular dependency * should fix fb and cjs bundles for ReactCurrentOwner * added provides module for ReactCurrentOwner * should improve console output * fixed typo with argument passing on functon call * Revert "should improve console output" This breaks the FB bundles. This reverts commit 65f11ee64f678c387cb3cfef9a8b28b89a6272b9. * Work around internal FB transform require() issue * moved ReactInstanceMap out of React and into ReactDOM and ReactDOMFiber * Expose more internal modules to www * Add missing modules to Stack ReactDOM to fix UFI * Fix onlyChild module * improved the build tool * Add a rollup npm script * Rename ReactDOM-fb to ReactDOMStack-fb * Fix circular dependencies now that ReactDOM-fb is a GK switch * Revert "Work around internal FB transform require() issue" This reverts commit 0a50b6a90bffc59f8f5416ef36000b5e3a44d253. * Bump rollup-plugin-commonjs to include a fix for rollup/rollup-plugin-commonjs#176 * Add more forwarding modules that are used on www * Add even more forwarding modules that are used on www * Add DOMProperty to hidden exports * Externalize feature flags This lets www specify them dynamically. * Remove forwarding modules with implementations Instead I'm adding them to react-fb in my diff. * Add all injection necessary for error logging * Add missing forwarding module (oops) * Add ReactART builds * Add ReactDOMServer bundle * Fix UMD build of ReactDOMFiber * Work in progress: start adding ReactNative bundle * tidied up the options for bundles, so they can define what types they output and exclude * Add a working RN build * further improved and tidied up build process * improved how bundles are built by exposing externals and making the process less "magical", also tidied up code and added more comments * better handling of bundling ReactCurrentOwner and accessing it from renderer modules * added NODE_DEV and NODE_PROD * added NPM package creation and copying into build chain * Improved UMD bundles, added better fixture testing and doc plus prod builds * updated internal modules (WIP) * removed all react/lib/* dependencies from appearing in bundles created on build * added react-test-renderer bundles * renamed bundles and paths * fixed fixture path changes * added extract-errors support * added extractErrors warning * moved shims to shims directory in rollup scripts * changed pathing to use build rather than build/rollup * updated release doc to reflect some rollup changes * Updated ReactNative findNodeHandle() to handle number case (#9238) * Add dynamic injection to ReactErrorUtils (#9246) * Fix ReactErrorUtils injection (#9247) * Fix Haste name * Move files around * More descriptive filenames * Add missing ReactErrorUtils shim * Tweak reactComponentExpect to make it standalone-ish in www * Unflowify shims * facebook-www shims now get copied over correctly to build * removed unnecessary resolve * building facebook-www/build is now all sync to prevent IO issues plus handles extra facebook-www src assets * removed react-native-renderer package and made build make a react-native build dir instead * 😭😭😭 * Add more SSR unit tests for elements and children. (#9221) * Adding more SSR unit tests for elements and children. * Some of my SSR tests were testing for react-text and react-empty elements that no longer exist in Fiber. Fixed the tests so that they expect correct markup in Fiber. * Tweaked some test names after @gaearon review comment https://github.com/facebook/react/pull/9221#discussion_r107045673 . Also realized that one of the tests was essentially a direct copy of another, so deleted it. * Responding to code review https://github.com/facebook/react/pull/9221#pullrequestreview-28996315 . Thanks @spicyj! * ReactElementValidator uses temporary ReactNative View propTypes getter (#9256) * Updating packages for 16.0.0-alpha.6 release * Revert "😭😭😭" This reverts commit 7dba33b2cfc67246881f6d57633a80e628ea05ec. * Work around Jest issue with CurrentOwner shared state in www * updated error codes * splits FB into FB_DEV and FB_PROD * Remove deps on specific builds from shims * should no longer mangle FB_PROD output * Added init() dev block to ReactTestUtils * added shims for DEV only code so it does not get included in prod bundles * added a __DEV__ wrapping code to FB_DEV * added __DEV__ flag behind a footer/header * Use right haste names * keeps comments in prod * added external babel helpers plugin * fixed fixtures and updated cjs/umd paths * Fixes Jest so it run tests correctly * fixed an issue with stubbed modules not properly being replaced due to greedy replacement * added a WIP solution for ReactCurrentOwner on FB DEV * adds a FB_TEST bundle * allows both ReactCurrentOwner and react/lib/ReactCurrentOwner * adds -test to provides module name * Remove TEST env * Ensure requires stay at the top * added basic mangle support (disbaled by default) * per bundle property mangling added * moved around plugin order to try and fix deadcode requires as per https://github.com/rollup/rollup/issues/855 * Fix flow issues * removed gulp and grunt and moved tasks to standalone node script * configured circleci to use new paths * Fix lint * removed gulp-extract-errors * added test_build.sh back in * added missing newline to flow.js * fixed test coverage command * changed permissions on test_build.sh * fixed test_html_generations.sh * temp removed html render test * removed the warning output from test_build, the build should do this instead * fixed test_build * fixed broken npm script * Remove unused ViewportMetrics shim * better error output * updated circleci to node 7 for async/await * Fixes * removed coverage test from circleci run * circleci run tets * removed build from circlci * made a dedicated jest script in a new process * moved order around of circlci tasks * changing path to jest in more circleci tests * re-enabled code coverage * Add file header to prod bundles * Remove react-dom/server.js (WIP: decide on the plan) * Only UMD bundles need version header * Merge with master * disabled const evaluation by uglify for <script></script> string literal * deal with ART modules for UMD bundles * improved how bundle output gets printed * fixed filesize difference reporting * added filesize dep * Update yarn lockfile for some reason * now compares against the last run branch built on * added react-dom-server * removed un-needed comment * results only get saved on full builds * moved the rollup sized plugin into a plugins directory * added a missing commonjs() * fixed missing ignore * Hack around to fix RN bundle * Partially fix RN bundles * added react-art bundle and a fixture for it * Point UMD bundle to Fiber and add EventPluginHub to exported internals * Make it build on Node 4 * fixed eslint error with resolve being defined in outer scope * Tweak how build results are calculated and stored * Tweak fixtures build to work on Node 4 * Include LICENSE/PATENTS and fix up package.json files * Add Node bundle for react-test-renderer * Revert "Hack around to fix RN bundle" We'll do this later. This reverts commit 59445a625962d7be4c7c3e98defc8a31f8761ec1. * Revert more RN changes We'll do them separately later * Revert more unintentional changes * Revert changes to error codes * Add accidentally deleted RN externals * added RN_DEV/RN_PROD bundles * fixed typo where RN_DEV and RN_PROD were the wrong way around * Delete/ignore fixture build outputs * Format scripts/ with Prettier * tidied up the Rollup build process and split functions into various different files to improve readability * Copy folder before files * updated yarn.lock * updated results and yarn dependencies to the latest versions
147 lines
14 KiB
JSON
147 lines
14 KiB
JSON
{
|
|
"0": "React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.",
|
|
"1": "update(): expected target of %s to be an array; got %s.",
|
|
"2": "update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?",
|
|
"3": "update(): You provided a key path to update() that did not contain one of %s. Did you forget to include {%s: ...}?",
|
|
"4": "Cannot have more than one key in an object with %s",
|
|
"5": "update(): %s expects a spec of type 'object'; got %s",
|
|
"6": "update(): %s expects a target of type 'object'; got %s",
|
|
"7": "Expected %s target to be an array; got %s",
|
|
"8": "update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?",
|
|
"9": "update(): expected spec of %s to be a function; got %s.",
|
|
"10": "findAllInRenderedTree(...): instance must be a composite component",
|
|
"11": "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.",
|
|
"12": "ReactShallowRenderer render(): Invalid component element.%s",
|
|
"13": "ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.",
|
|
"14": "TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if you are using shallow rendering.",
|
|
"15": "reactComponentExpect(...): instance must be a composite component",
|
|
"16": "Do not override existing functions.",
|
|
"17": "All native instances should have a tag.",
|
|
"18": "Expected a component class, got %s.%s",
|
|
"19": "Expect a native root tag, instead got %s",
|
|
"20": "RawText \"%s\" must be wrapped in an explicit <Text> component.",
|
|
"21": "findNodeHandle(...): Argument is not a component (type: %s, keys: %s)",
|
|
"22": "findNodeHandle(...): Unable to find node handle for unmounted component.",
|
|
"23": "onlyChild must be passed a children with exactly one child.",
|
|
"24": "Mismatched list of contexts in callback queue",
|
|
"25": "Trying to release an instance into a pool of a different type.",
|
|
"26": "Unexpected node: %s",
|
|
"27": "Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.",
|
|
"28": "Transaction.closeAll(): Cannot close transaction when none are open.",
|
|
"29": "accumulate(...): Accumulated items must be not be null or undefined.",
|
|
"30": "accumulateInto(...): Accumulated items must not be null or undefined.",
|
|
"31": "Objects are not valid as a React child (found: %s).%s",
|
|
"32": "Unable to find element with ID %s.",
|
|
"33": "getNodeFromInstance: Invalid argument.",
|
|
"34": "React DOM tree root should always have a node reference.",
|
|
"35": "isAncestor: Invalid argument.",
|
|
"36": "getParentInstance: Invalid argument.",
|
|
"37": "_registerComponent(...): Target container is not a DOM element.",
|
|
"38": "parentComponent must be a valid React Component",
|
|
"39": "ReactDOM.render(): Invalid component element.%s",
|
|
"40": "unmountComponentAtNode(...): Target container is not a DOM element.",
|
|
"41": "mountComponentIntoNode(...): Target container is not valid.",
|
|
"42": "You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",
|
|
"43": "You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.",
|
|
"44": "findDOMNode was called on an unmounted component.",
|
|
"45": "Element appears to be neither ReactComponent nor DOMNode (keys: %s)",
|
|
"46": "renderToString(): You must pass a valid ReactElement.",
|
|
"47": "renderToStaticMarkup(): You must pass a valid ReactElement.",
|
|
"48": "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",
|
|
"49": "DOMProperty: Properties that have side effects must use property: %s",
|
|
"50": "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",
|
|
"51": "dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString for server rendering.",
|
|
"52": "dangerouslyRenderMarkup(...): Missing markup.",
|
|
"53": "Danger: Assigning to an already-occupied result index.",
|
|
"54": "Danger: Did not assign to every index of resultList.",
|
|
"55": "Danger: Expected markup to render %s nodes, but rendered %s.",
|
|
"56": "dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.",
|
|
"57": "dangerouslyReplaceNodeWithMarkup(...): Missing markup.",
|
|
"58": "dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().",
|
|
"59": "%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.%s",
|
|
"60": "Can only set one of `children` or `props.dangerouslySetInnerHTML`.",
|
|
"61": "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.",
|
|
"62": "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",
|
|
"63": "Must be mounted to trap events",
|
|
"64": "trapBubbledEvent(...): Requires node to be rendered.",
|
|
"65": "Invalid tag: %s",
|
|
"66": "<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",
|
|
"67": "Missing closing comment for text component %s",
|
|
"68": "Expected devtool events to fire for the child before its parent includes it in onSetChildren().",
|
|
"69": "Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().",
|
|
"70": "Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().",
|
|
"71": "Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().",
|
|
"72": "Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).",
|
|
"73": "ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",
|
|
"74": "ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",
|
|
"75": "ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object.",
|
|
"76": "ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.",
|
|
"77": "ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",
|
|
"78": "ReactClass: You are attempting to define a reserved property, `%s`, that shouldn't be on the \"statics\" key. Define it as an instance property instead; it will still be accessible on the constructor.",
|
|
"79": "ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",
|
|
"80": "mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.",
|
|
"81": "mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",
|
|
"82": "%s.getInitialState(): must return an object or null",
|
|
"83": "createClass(...): Class specification must implement a `render` method.",
|
|
"84": "%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",
|
|
"85": "setState(...): takes an object of state variables to update or a function which returns an object of state variables.",
|
|
"86": "SimpleEventPlugin: Unhandled event type, `%s`.",
|
|
"87": "Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa.",
|
|
"88": "Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink.",
|
|
"89": "Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink",
|
|
"90": "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.",
|
|
"91": "`dangerouslySetInnerHTML` does not make sense on <textarea>.",
|
|
"92": "If you supply `defaultValue` on a <textarea>, do not pass children.",
|
|
"93": "<textarea> can only have at most one child.",
|
|
"94": "Expected %s listener to be a function, instead got type %s",
|
|
"95": "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.",
|
|
"96": "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",
|
|
"97": "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",
|
|
"98": "EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",
|
|
"99": "EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",
|
|
"100": "EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",
|
|
"101": "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.",
|
|
"102": "EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",
|
|
"103": "executeDirectDispatch(...): Invalid `event`.",
|
|
"104": "ReactCompositeComponent: injectEnvironment() can only be called once.",
|
|
"105": "%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.",
|
|
"106": "%s.state: must be set to an object or null",
|
|
"107": "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
|
|
"108": "%s.getChildContext(): key \"%s\" is not defined in childContextTypes.",
|
|
"109": "%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.",
|
|
"110": "Stateless function components cannot have refs.",
|
|
"111": "There is no registered component for the tag %s",
|
|
"112": "getNextDescendantID(%s, %s): Received an invalid React DOM ID.",
|
|
"113": "getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",
|
|
"114": "getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",
|
|
"115": "traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",
|
|
"116": "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",
|
|
"117": "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",
|
|
"118": "updateTextContent called on non-empty component.",
|
|
"119": "addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).",
|
|
"120": "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).",
|
|
"121": "performUpdateIfNecessary: Unexpected batch number (current %s, pending %s)",
|
|
"122": "%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",
|
|
"123": "ReactUpdates: must inject a reconcile transaction class and batching strategy",
|
|
"124": "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",
|
|
"125": "ReactUpdates.asap: Can't enqueue an asap callback in a context where updates are not being batched.",
|
|
"126": "ReactUpdates: must provide a reconcile transaction class",
|
|
"127": "ReactUpdates: must provide a batching strategy",
|
|
"128": "ReactUpdates: must provide a batchedUpdates() function",
|
|
"129": "ReactUpdates: must provide an isBatchingUpdates boolean attribute",
|
|
"130": "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
"131": "Encountered invalid React node of type %s",
|
|
"132": "Ended a touch event which was not counted in trackedTouchCount.",
|
|
"133": "Touch object is missing identifier",
|
|
"134": "Touch data should have been recorded on start",
|
|
"135": "Cannot find single active touch",
|
|
"136": "Attempted to update component `%s` that has already been unmounted (or failed to mount).",
|
|
"137": "%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s",
|
|
"138": "Touch object is missing identifier.",
|
|
"139": "ReactTestRenderer: .update() can't be called after unmount.",
|
|
"140": "Expected hook events to fire for the child before its parent includes it in onSetChildren().",
|
|
"141": "Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().",
|
|
"142": "Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).",
|
|
"143": "React.Children.only expected to receive a single React element child.",
|
|
"144": "React.PropTypes type checking code is stripped in production."
|
|
} |