+ );
+ }
+}
+apps.push(
+
+
+
+);
+
+// This component, with the version prop, helps organize DevTools at a glance.
+function TopLevelWrapperForDevTools({ version }) {
+ let header =
+ );
+}
+TopLevelWrapperForDevTools.displayName = 'React';
+
+ReactDOM.render(
+ ,
+ document.getElementById('root')
+);
diff --git a/fixtures/regression/styles.css b/fixtures/regression/styles.css
new file mode 100644
index 0000000000..6cbaaa5c01
--- /dev/null
+++ b/fixtures/regression/styles.css
@@ -0,0 +1,37 @@
+body {
+ font-family: sans-serif;
+ font-size: 12px;
+}
+
+h1 {
+ margin: 0;
+ font-size: 20px;
+}
+
+h2 {
+ margin: 1rem 0 0;
+}
+
+iframe {
+ border: 1px solid #ddd;
+ border-radius: 0.5rem;
+}
+
+code {
+ white-space: nowrap;
+}
+
+.Feature {
+ margin: 1rem 0;
+ border-bottom: 1px solid #eee;
+ padding-bottom: 1rem;
+}
+.FeatureHeader {
+ font-size: 16px;
+ margin-bottom: 0.5rem;
+}
+.FeatureCode {
+ background-color: #eee;
+ padding: 0.25rem;
+ border-radius: 0.25rem;
+}
diff --git a/flow-typed/jest.js b/flow-typed/jest.js
index df83ee3ca3..8563e20d93 100644
--- a/flow-typed/jest.js
+++ b/flow-typed/jest.js
@@ -133,11 +133,13 @@ type JestPromiseType = {
* Use rejects to unwrap the reason of a rejected promise so any other
* matcher can be chained. If the promise is fulfilled the assertion fails.
*/
+ // eslint-disable-next-line no-use-before-define
rejects: JestExpectType,
/**
* Use resolves to unwrap the value of a fulfilled promise so any other
* matcher can be chained. If the promise is rejected the assertion fails.
*/
+ // eslint-disable-next-line no-use-before-define
resolves: JestExpectType,
};
@@ -1085,8 +1087,10 @@ type JestPrettyFormatColors = {
};
type JestPrettyFormatIndent = string => string;
+// eslint-disable-next-line no-unused-vars
type JestPrettyFormatRefs = Array;
type JestPrettyFormatPrint = any => string;
+// eslint-disable-next-line no-unused-vars
type JestPrettyFormatStringOrNull = string | null;
type JestPrettyFormatOptions = {|
@@ -1097,6 +1101,7 @@ type JestPrettyFormatOptions = {|
indent: number,
maxDepth: number,
min: boolean,
+ // eslint-disable-next-line no-use-before-define
plugins: JestPrettyFormatPlugins,
printFunctionName: boolean,
spacing: string,
diff --git a/package.json b/package.json
index 9e9dbc8332..f9bb136be5 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"/src/__tests__/storeSerializer"
],
"testMatch": [
- "**/__tests__/*-test.js"
+ "**/__tests__/**/*-test.js"
]
},
"scripts": {
@@ -132,8 +132,10 @@
"prettier": "^1.16.4",
"prop-types": "^15.6.2",
"react": "^0.0.0-50b50c26f",
+ "react-15": "npm:react@^15",
"react-color": "^2.11.7",
"react-dom": "^0.0.0-50b50c26f",
+ "react-dom-15": "npm:react-dom@^15",
"react-is": "^0.0.0-50b50c26f",
"react-test-renderer": "^0.0.0-50b50c26f",
"react-virtualized-auto-sizer": "^1.0.2",
@@ -142,6 +144,7 @@
"rimraf": "^2.6.3",
"scheduler": "^0.0.0-50b50c26f",
"semver": "^5.5.1",
+ "serve-static": "^1.14.1",
"style-loader": "^0.23.1",
"web-ext": "^3.0.0",
"webpack": "^4.26.0",
diff --git a/src/__tests__/legacy/__snapshots__/storeLegacy-v15-test.js.snap b/src/__tests__/legacy/__snapshots__/storeLegacy-v15-test.js.snap
new file mode 100644
index 0000000000..d43112d058
--- /dev/null
+++ b/src/__tests__/legacy/__snapshots__/storeLegacy-v15-test.js.snap
@@ -0,0 +1,498 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Store (legacy) collapseNodesByDefault:false should not filter DOM nodes from the store tree: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should not filter DOM nodes from the store tree: 2: update 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should not filter DOM nodes from the store tree: 5: unmount 1`] = ``;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support adding and removing children: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support adding and removing children: 2: add child 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support adding and removing children: 3: remove child 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 2: collapse first Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 3: collapse second Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 4: expand first Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 5: collapse Grandparent 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support collapsing parts of the tree: 6: expand Grandparent 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations for multiple roots: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+
+[root]
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations for multiple roots: 2: update 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+
+ ▾
+
+[root]
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations for multiple roots: 3: unmount B 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations for multiple roots: 4: unmount A 1`] = ``;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations: 2: update 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support mount and update operations: 3: unmount 1`] = ``;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support reordering of children: 1: mount 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support reordering of children: 2: reorder children 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support reordering of children: 3: collapse root 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:false should support reordering of children: 4: expand root 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+ ▾
+
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should not filter DOM nodes from the store tree: 1: mount 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should not filter DOM nodes from the store tree: 2: expand Grandparent 1`] = `
+[root]
+ ▾
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should not filter DOM nodes from the store tree: 3: expand div 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▸
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should not filter DOM nodes from the store tree: 4: final update 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▸
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should not filter DOM nodes from the store tree: 5: unmount 1`] = ``;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 1: mount 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 2: expand deepest node 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 3: collapse root 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 4: expand root 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 5: collapse middle node 1`] = `
+[root]
+ ▾
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding deep parts of the tree: 6: expand middle node 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▾
+ ▾
+
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 1: mount 1`] = `
+[root]
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 2: expand Grandparent 1`] = `
+[root]
+ ▾
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 3: expand parent div 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 4: expand first Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▸
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 5: expand second Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▾
+ ▸
+ ▾
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 6: collapse first Parent 1`] = `
+[root]
+ ▾
+ ▾
+ ▸
+ ▾
+ ▸
+`;
+
+exports[`Store (legacy) collapseNodesByDefault:true should support expanding parts of the tree: 7: collapse second Parent 1`] = `
+[root]
+ ▾