mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge branch 'master' into rollup
This commit is contained in:
commit
3f89a779d5
49 files changed
+1937
-1191
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z $CI_PULL_REQUEST ] && [ "$CIRCLE_BRANCH" = "$REACT_WEBSITE_BRANCH" ]; then
|
||||
if [ "$CIRCLE_BRANCH" = "$REACT_WEBSITE_BRANCH" ]; then
|
||||
|
||||
GH_PAGES_DIR=`pwd`/../react-gh-pages
|
||||
|
||||
|
||||
@@ -142,5 +142,6 @@
|
||||
"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."
|
||||
"143": "React.Children.only expected to receive a single React element child.",
|
||||
"144": "React.PropTypes type checking code is stripped in production."
|
||||
}
|
||||
@@ -151,7 +151,7 @@ function recordTests(maxWorkers, trackFacts) {
|
||||
);
|
||||
|
||||
if (trackFacts) {
|
||||
const fact = runResults.numPassedTests + '/' + runResults.numTotalTests;
|
||||
const fact = runResults.numPassedTests + '/' + (runResults.numPassedTests + runResults.numFailedTests);
|
||||
// TODO: Shelling out here is silly.
|
||||
child_process.spawnSync(
|
||||
process.execPath,
|
||||
|
||||
@@ -1,21 +1,6 @@
|
||||
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
|
||||
* should pass previous context to lifecycles
|
||||
|
||||
src/renderers/__tests__/ReactComponentTreeHook-test.js
|
||||
* can be retrieved by ID
|
||||
|
||||
src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
|
||||
* gets recorded during an update
|
||||
|
||||
src/renderers/__tests__/ReactPerf-test.js
|
||||
* should count no-op update as waste
|
||||
* should count no-op update in child as waste
|
||||
* should include stats for components unmounted during measurement
|
||||
* should include lifecycle methods in measurements
|
||||
* should include render time of functional components
|
||||
* should not count time in a portal towards lifecycle method
|
||||
* should work when measurement starts during reconciliation
|
||||
|
||||
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
|
||||
* gives source code refs for unknown prop warning (ssr)
|
||||
* gives source code refs for unknown prop warning for exact elements (ssr)
|
||||
|
||||
@@ -1,132 +1,3 @@
|
||||
src/renderers/__tests__/ReactComponentTreeHook-test.js
|
||||
* uses displayName or Unknown for classic components
|
||||
* uses displayName, name, or ReactComponent for modern components
|
||||
* uses displayName, name, or Object for factory components
|
||||
* uses displayName, name, or StatelessComponent for functional components
|
||||
* reports a host tree correctly
|
||||
* reports a simple tree with composites correctly
|
||||
* reports a tree with composites correctly
|
||||
* ignores null children
|
||||
* ignores false children
|
||||
* reports text nodes as children
|
||||
* reports a single text node as a child
|
||||
* reports a single number node as a child
|
||||
* reports a zero as a child
|
||||
* skips empty nodes for multiple children
|
||||
* reports html content as no children
|
||||
* updates text of a single text child
|
||||
* updates from no children to a single text child
|
||||
* updates from a single text child to no children
|
||||
* updates from html content to a single text child
|
||||
* updates from a single text child to html content
|
||||
* updates from no children to multiple text children
|
||||
* updates from multiple text children to no children
|
||||
* updates from html content to multiple text children
|
||||
* updates from multiple text children to html content
|
||||
* updates from html content to no children
|
||||
* updates from no children to html content
|
||||
* updates from one text child to multiple text children
|
||||
* updates from multiple text children to one text child
|
||||
* updates text nodes when reordering
|
||||
* updates host nodes when reordering with keys
|
||||
* updates host nodes when reordering without keys
|
||||
* updates a single composite child of a different type
|
||||
* updates a single composite child of the same type
|
||||
* updates from no children to a single composite child
|
||||
* updates from a single composite child to no children
|
||||
* updates mixed children
|
||||
* updates with a host child
|
||||
* updates from null to a host child
|
||||
* updates from a host child to null
|
||||
* updates from a host child to a composite child
|
||||
* updates from a composite child to a host child
|
||||
* updates from null to a composite child
|
||||
* updates from a composite child to null
|
||||
* updates with a host child
|
||||
* updates from null to a host child
|
||||
* updates from a host child to null
|
||||
* updates from a host child to a composite child
|
||||
* updates from a composite child to a host child
|
||||
* updates from null to a composite child
|
||||
* updates from a composite child to null
|
||||
* tracks owner correctly
|
||||
* purges unmounted components automatically
|
||||
* reports update counts
|
||||
* does not report top-level wrapper as a root
|
||||
* registers inlined text nodes
|
||||
* works
|
||||
|
||||
src/renderers/__tests__/ReactComponentTreeHook-test.native.js
|
||||
* uses displayName or Unknown for classic components
|
||||
* uses displayName, name, or ReactComponent for modern components
|
||||
* uses displayName, name, or Object for factory components
|
||||
* uses displayName, name, or StatelessComponent for functional components
|
||||
* reports a host tree correctly
|
||||
* reports a simple tree with composites correctly
|
||||
* reports a tree with composites correctly
|
||||
* ignores null children
|
||||
* ignores false children
|
||||
* reports text nodes as children
|
||||
* reports a single text node as a child
|
||||
* reports a single number node as a child
|
||||
* reports a zero as a child
|
||||
* skips empty nodes for multiple children
|
||||
* updates text of a single text child
|
||||
* updates from no children to a single text child
|
||||
* updates from a single text child to no children
|
||||
* updates from no children to multiple text children
|
||||
* updates from multiple text children to no children
|
||||
* updates from one text child to multiple text children
|
||||
* updates from multiple text children to one text child
|
||||
* updates text nodes when reordering
|
||||
* updates host nodes when reordering with keys
|
||||
* updates host nodes when reordering with keys
|
||||
* updates a single composite child of a different type
|
||||
* updates a single composite child of the same type
|
||||
* updates from no children to a single composite child
|
||||
* updates from a single composite child to no children
|
||||
* updates mixed children
|
||||
* updates with a host child
|
||||
* updates from null to a host child
|
||||
* updates from a host child to null
|
||||
* updates from a host child to a composite child
|
||||
* updates from a composite child to a host child
|
||||
* updates from null to a composite child
|
||||
* updates from a composite child to null
|
||||
* updates with a host child
|
||||
* updates from null to a host child
|
||||
* updates from a host child to null
|
||||
* updates from a host child to a composite child
|
||||
* updates from a composite child to a host child
|
||||
* updates from null to a composite child
|
||||
* updates from a composite child to null
|
||||
* tracks owner correctly
|
||||
* purges unmounted components automatically
|
||||
* reports update counts
|
||||
* does not report top-level wrapper as a root
|
||||
|
||||
src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
|
||||
* gets recorded for host roots
|
||||
* gets recorded for composite roots
|
||||
* gets recorded when a native is mounted deeply instead of null
|
||||
* gets recorded during mount
|
||||
* gets recorded during an update
|
||||
* gets ignored if the styles are shallowly equal
|
||||
* gets recorded during mount
|
||||
* gets recorded during mount
|
||||
* gets recorded during mount
|
||||
* gets recorded during an update from text content
|
||||
* gets recorded during an update from html
|
||||
* gets recorded during an update from children
|
||||
* gets recorded when composite renders to a different type
|
||||
* gets recorded when composite renders to null after a native
|
||||
* gets recorded during an update from text content
|
||||
* gets recorded during an update from html
|
||||
* gets recorded during an update from children
|
||||
* gets reported when a child is inserted
|
||||
* gets reported when a child is inserted
|
||||
* gets reported when a child is removed
|
||||
|
||||
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
|
||||
* should not warn when server-side rendering `onScroll`
|
||||
* should warn about incorrect casing on properties (ssr)
|
||||
|
||||
@@ -157,13 +157,6 @@ src/isomorphic/children/__tests__/onlyChild-test.js
|
||||
* should not fail when passed interpolated single child
|
||||
* should return the only child
|
||||
|
||||
src/isomorphic/children/__tests__/sliceChildren-test.js
|
||||
* should render the whole set if start zero is supplied
|
||||
* should render the remaining set if no end index is supplied
|
||||
* should exclude everything at or after the end index
|
||||
* should allow static children to be sliced
|
||||
* should slice nested children
|
||||
|
||||
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
|
||||
* should filter out context not in contextTypes
|
||||
* should pass next context to lifecycles
|
||||
@@ -568,8 +561,6 @@ src/renderers/__tests__/ReactComponentLifeCycle-test.js
|
||||
|
||||
src/renderers/__tests__/ReactComponentTreeHook-test.js
|
||||
* gets created
|
||||
* is created during mounting
|
||||
* is created when calling renderToString during render
|
||||
|
||||
src/renderers/__tests__/ReactCompositeComponent-test.js
|
||||
* should support module pattern components
|
||||
@@ -680,17 +671,6 @@ src/renderers/__tests__/ReactErrorBoundaries-test.js
|
||||
* renders empty output if error boundary does not handle the error
|
||||
* passes first error when two errors happen in commit
|
||||
|
||||
src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
|
||||
* gets ignored for composite roots that return null
|
||||
* gets recorded during an update
|
||||
* gets recorded as a removal during an update
|
||||
* gets recorded during an update
|
||||
* gets recorded during an update
|
||||
* gets ignored if new text is equal
|
||||
* gets ignored if new text is equal
|
||||
* gets ignored if the type has not changed
|
||||
* gets ignored if new html is equal
|
||||
|
||||
src/renderers/__tests__/ReactIdentity-test.js
|
||||
* should allow key property to express identity
|
||||
* should use composite identity
|
||||
@@ -757,41 +737,6 @@ src/renderers/__tests__/ReactMultiChildText-test.js
|
||||
* should throw if rendering both HTML and children
|
||||
* should render between nested components and inline children
|
||||
|
||||
src/renderers/__tests__/ReactPerf-test.js
|
||||
* should not count initial render as waste
|
||||
* should not count unmount as waste
|
||||
* should not count content update as waste
|
||||
* should not count child addition as waste
|
||||
* should not count child removal as waste
|
||||
* should not count property update as waste
|
||||
* should not count style update as waste
|
||||
* should not count property removal as waste
|
||||
* should not count raw HTML update as waste
|
||||
* should not count child reordering as waste
|
||||
* should not count text update as waste
|
||||
* should not count replacing null with a host as waste
|
||||
* should not count replacing a host with null as waste
|
||||
* warns once when using getMeasurementsSummaryMap
|
||||
* warns once when using printDOM
|
||||
* returns isRunning state
|
||||
* start has no effect when already running
|
||||
* stop has no effect when already stopped
|
||||
* should print console error only once
|
||||
* should not print errant warnings if render() throws
|
||||
* should not print errant warnings if componentWillMount() throws
|
||||
* should not print errant warnings if componentDidMount() throws
|
||||
* should not print errant warnings if portal throws in render()
|
||||
* should not print errant warnings if portal throws in componentWillMount()
|
||||
* should not print errant warnings if portal throws in componentDidMount()
|
||||
|
||||
src/renderers/__tests__/ReactStateSetters-test.js
|
||||
* createStateSetter should update state
|
||||
* createStateKeySetter should update state
|
||||
* createStateKeySetter is memoized
|
||||
* createStateSetter should update state from mixin
|
||||
* createStateKeySetter should update state with mixin
|
||||
* createStateKeySetter is memoized with mixin
|
||||
|
||||
src/renderers/__tests__/ReactStatelessComponent-test.js
|
||||
* should render stateless component
|
||||
* should update stateless component
|
||||
@@ -1580,6 +1525,21 @@ src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js
|
||||
* should ignore errors thrown in log method to prevent cycle
|
||||
* should relay info about error boundary and retry attempts if applicable
|
||||
|
||||
src/renderers/shared/fiber/__tests__/ReactIncrementalPerf-test.js
|
||||
* measures a simple reconciliation
|
||||
* skips parents during setState
|
||||
* warns on cascading renders from setState
|
||||
* warns on cascading renders from top-level render
|
||||
* does not treat setState from cWM or cWRP as cascading
|
||||
* captures all lifecycles
|
||||
* measures deprioritized work
|
||||
* measures deferred work in chunks
|
||||
* recovers from fatal errors
|
||||
* recovers from caught errors
|
||||
* deduplicates lifecycle names during commit to reduce overhead
|
||||
* supports coroutines
|
||||
* supports portals
|
||||
|
||||
src/renderers/shared/fiber/__tests__/ReactIncrementalReflection-test.js
|
||||
* handles isMounted even when the initial render is deferred
|
||||
* handles isMounted when an unmount is deferred
|
||||
@@ -1656,7 +1616,6 @@ src/renderers/shared/shared/event/__tests__/EventPluginRegistry-test.js
|
||||
* should publish registration names of injected plugins
|
||||
* should throw if multiple registration names collide
|
||||
* should throw if an invalid event is published
|
||||
* should be able to get the plugin from synthetic events
|
||||
|
||||
src/renderers/shared/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js
|
||||
* should do nothing when no one wants to respond
|
||||
@@ -1695,6 +1654,7 @@ src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js
|
||||
* should return null if no error is thrown (development)
|
||||
* can nest with same debug name (development)
|
||||
* does not return nested errors (development)
|
||||
* can be shimmed (development)
|
||||
* it should rethrow errors caught by invokeGuardedCallbackAndCatchFirstError (production)
|
||||
* should call the callback the passed arguments (production)
|
||||
* should call the callback with the provided context (production)
|
||||
@@ -1702,6 +1662,7 @@ src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js
|
||||
* should return null if no error is thrown (production)
|
||||
* can nest with same debug name (production)
|
||||
* does not return nested errors (production)
|
||||
* can be shimmed (production)
|
||||
|
||||
src/renderers/shared/utils/__tests__/accumulateInto-test.js
|
||||
* throws if the second item is null
|
||||
|
||||
@@ -22,6 +22,7 @@ var pathToBabel = path.join(require.resolve('babel-core'), '..', 'package.json')
|
||||
var pathToModuleMap = require.resolve('fbjs/module-map');
|
||||
var pathToBabelPluginDevWithCode = require.resolve('../error-codes/dev-expression-with-codes');
|
||||
var pathToBabelPluginModules = require.resolve('fbjs-scripts/babel-6/rewrite-modules');
|
||||
var pathToBabelPluginAsyncToGenerator = require.resolve('babel-plugin-transform-async-to-generator');
|
||||
var pathToBabelrc = path.join(__dirname, '..', '..', '.babelrc');
|
||||
var pathToErrorCodes = require.resolve('../error-codes/codes.json');
|
||||
|
||||
@@ -54,11 +55,17 @@ module.exports = {
|
||||
!filePath.match(/\/node_modules\//) &&
|
||||
!filePath.match(/\/third_party\//)
|
||||
) {
|
||||
// for test files, we also apply the async-await transform, but we want to
|
||||
// make sure we don't accidentally apply that transform to product code.
|
||||
var isTestFile = !!filePath.match(/\/__tests__\//);
|
||||
return babel.transform(
|
||||
src,
|
||||
Object.assign(
|
||||
{filename: path.relative(process.cwd(), filePath)},
|
||||
babelOptions
|
||||
babelOptions,
|
||||
isTestFile ? {
|
||||
plugins: [pathToBabelPluginAsyncToGenerator].concat(babelOptions.plugins),
|
||||
} : {}
|
||||
)
|
||||
).code;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user