Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Patch Release] v16.10.2 #17007

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/create-subscription/package.json
@@ -1,7 +1,7 @@
{
"name": "create-subscription",
"description": "utility for subscribing to external data sources inside React components",
"version": "16.9.0",
"version": "16.10.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/package.json
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "2.0.1",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-react/package.json
@@ -1,6 +1,6 @@
{
"name": "jest-react",
"version": "0.7.0",
"version": "0.8.1",
"description": "Jest matchers and utilities for testing React components.",
"main": "index.js",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions packages/legacy-events/EventPluginHub.js
Expand Up @@ -132,10 +132,10 @@ export function getListener(inst: Fiber, registrationName: string) {
*/
function extractPluginEvents(
topLevelType: TopLevelType,
eventSystemFlags: EventSystemFlags,
targetInst: null | Fiber,
nativeEvent: AnyNativeEvent,
nativeEventTarget: EventTarget,
eventSystemFlags: EventSystemFlags,
): Array<ReactSyntheticEvent> | ReactSyntheticEvent | null {
let events = null;
for (let i = 0; i < plugins.length; i++) {
Expand All @@ -144,10 +144,10 @@ function extractPluginEvents(
if (possiblePlugin) {
const extractedEvents = possiblePlugin.extractEvents(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
);
if (extractedEvents) {
events = accumulateInto(events, extractedEvents);
Expand All @@ -159,17 +159,17 @@ function extractPluginEvents(

export function runExtractedPluginEventsInBatch(
topLevelType: TopLevelType,
eventSystemFlags: EventSystemFlags,
targetInst: null | Fiber,
nativeEvent: AnyNativeEvent,
nativeEventTarget: EventTarget,
eventSystemFlags: EventSystemFlags,
) {
const events = extractPluginEvents(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
);
runEventsInBatch(events);
}
2 changes: 1 addition & 1 deletion packages/legacy-events/PluginModuleType.js
Expand Up @@ -25,10 +25,10 @@ export type PluginModule<NativeEvent> = {
eventTypes: EventTypes,
extractEvents: (
topLevelType: TopLevelType,
eventSystemFlags: EventSystemFlags,
targetInst: null | Fiber,
nativeTarget: NativeEvent,
nativeEventTarget: EventTarget,
eventSystemFlags: EventSystemFlags,
) => ?ReactSyntheticEvent,
tapMoveThreshold?: number,
};
2 changes: 1 addition & 1 deletion packages/legacy-events/ResponderEventPlugin.js
Expand Up @@ -504,10 +504,10 @@ const ResponderEventPlugin = {
*/
extractEvents: function(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
) {
if (isStartish(topLevelType)) {
trackedTouchCount += 1;
Expand Down
Expand Up @@ -314,10 +314,10 @@ const run = function(config, hierarchyConfig, nativeEventConfig) {
// Trigger the event
const extractedEvents = ResponderEventPlugin.extractEvents(
nativeEventConfig.topLevelType,
PLUGIN_EVENT_SYSTEM,
nativeEventConfig.targetInst,
nativeEventConfig.nativeEvent,
nativeEventConfig.target,
PLUGIN_EVENT_SYSTEM,
);

// At this point the negotiation events have been dispatched as part of the
Expand Down
4 changes: 2 additions & 2 deletions packages/react-art/package.json
@@ -1,7 +1,7 @@
{
"name": "react-art",
"description": "React ART is a JavaScript library for drawing vector graphics using React. It provides declarative and reactive bindings to the ART library. Using the same declarative API you can render the output to either Canvas, SVG or VML (IE8).",
"version": "16.9.0",
"version": "16.10.1",
"main": "index.js",
"repository": {
"type": "git",
Expand All @@ -27,7 +27,7 @@
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.15.0"
"scheduler": "^0.16.1"
},
"peerDependencies": {
"react": "^16.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-shell/src/app/ReactNativeWeb/index.js
Expand Up @@ -11,7 +11,7 @@ import React, {Fragment, useState} from 'react';
import {Button, Text, View} from 'react-native-web';

export default function ReactNativeWeb() {
const [backgroundColor, setBackgroundColor] = useState('blue');
const [backgroundColor, setBackgroundColor] = useState('purple');
const toggleColor = () =>
setBackgroundColor(backgroundColor === 'purple' ? 'green' : 'purple');
return (
Expand All @@ -29,8 +29,8 @@ export default function ReactNativeWeb() {
left
</Text>
<Button
color={backgroundColor}
onPress={toggleColor}
style={{backgroundColor}}
title={`Switch background color to "${
backgroundColor === 'purple' ? 'green' : 'purple'
}"`}
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/package.json
@@ -1,6 +1,6 @@
{
"name": "react-dom",
"version": "16.9.0",
"version": "16.10.1",
"description": "React package for working with the DOM.",
"main": "index.js",
"repository": {
Expand All @@ -20,7 +20,7 @@
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.15.0"
"scheduler": "^0.16.1"
},
"peerDependencies": {
"react": "^16.0.0"
Expand Down
Expand Up @@ -659,4 +659,15 @@ describe('ReactDOMServerHydration', () => {

document.body.removeChild(parentContainer);
});

it('regression test: Suspense + hydration in legacy mode ', () => {
const element = document.createElement('div');
element.innerHTML = '<div>Hello World</div>';
ReactDOM.hydrate(
<React.Suspense>
<div>Hello World</div>
</React.Suspense>,
element,
);
});
});
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/BeforeInputEventPlugin.js
Expand Up @@ -464,10 +464,10 @@ const BeforeInputEventPlugin = {

extractEvents: function(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
) {
const composition = extractCompositionEvent(
topLevelType,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/ChangeEventPlugin.js
Expand Up @@ -262,10 +262,10 @@ const ChangeEventPlugin = {

extractEvents: function(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
) {
const targetNode = targetInst ? getNodeFromInstance(targetInst) : window;

Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/EnterLeaveEventPlugin.js
Expand Up @@ -54,10 +54,10 @@ const EnterLeaveEventPlugin = {
*/
extractEvents: function(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
) {
const isOverEvent =
topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/ReactDOMEventListener.js
Expand Up @@ -181,10 +181,10 @@ function handleTopLevel(bookKeeping: BookKeepingInstance) {

runExtractedPluginEventsInBatch(
topLevelType,
bookKeeping.eventSystemFlags,
targetInst,
nativeEvent,
eventTarget,
bookKeeping.eventSystemFlags,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/SelectEventPlugin.js
Expand Up @@ -162,10 +162,10 @@ const SelectEventPlugin = {

extractEvents: function(
topLevelType,
eventSystemFlags,
targetInst,
nativeEvent,
nativeEventTarget,
eventSystemFlags,
) {
const doc = getEventTargetDocument(nativeEventTarget);
// Track whether all listeners exists for this plugin. If none exist, we do
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/SimpleEventPlugin.js
Expand Up @@ -248,10 +248,10 @@ const SimpleEventPlugin: PluginModule<MouseEvent> & {

extractEvents: function(
topLevelType: TopLevelType,
eventSystemFlags: EventSystemFlags,
targetInst: null | Fiber,
nativeEvent: MouseEvent,
nativeEventTarget: EventTarget,
eventSystemFlags: EventSystemFlags,
): null | ReactSyntheticEvent {
const dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
if (!dispatchConfig) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-is/package.json
@@ -1,6 +1,6 @@
{
"name": "react-is",
"version": "16.9.0",
"version": "16.10.1",
"description": "Brand checking of React Elements.",
"main": "index.js",
"repository": {
Expand Down
Expand Up @@ -42,10 +42,10 @@ export function dispatchEvent(
// Heritage plugin event system
runExtractedPluginEventsInBatch(
topLevelType,
PLUGIN_EVENT_SYSTEM,
targetFiber,
nativeEvent,
nativeEvent.target,
PLUGIN_EVENT_SYSTEM,
);
});
// React Native doesn't use ReactControlledComponent but if it did, here's
Expand Down
Expand Up @@ -33,10 +33,10 @@ const ReactNativeBridgeEventPlugin = {
*/
extractEvents: function(
topLevelType: TopLevelType,
eventSystemFlags: EventSystemFlags,
targetInst: null | Object,
nativeEvent: AnyNativeEvent,
nativeEventTarget: Object,
eventSystemFlags: EventSystemFlags,
): ?Object {
if (targetInst == null) {
// Probably a node belonging to another renderer's tree.
Expand Down
Expand Up @@ -101,10 +101,10 @@ function _receiveRootNodeIDEvent(
batchedUpdates(function() {
runExtractedPluginEventsInBatch(
topLevelType,
PLUGIN_EVENT_SYSTEM,
inst,
nativeEvent,
nativeEvent.target,
PLUGIN_EVENT_SYSTEM,
);
});
// React Native doesn't use ReactControlledComponent but if it did, here's
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/package.json
@@ -1,7 +1,7 @@
{
"name": "react-reconciler",
"description": "React package for creating custom renderers.",
"version": "0.21.0",
"version": "0.22.1",
"keywords": [
"react"
],
Expand Down Expand Up @@ -33,7 +33,7 @@
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.15.0"
"scheduler": "^0.16.1"
},
"browserify": {
"transform": [
Expand Down
9 changes: 4 additions & 5 deletions packages/react-reconciler/src/ReactFiberHydrationContext.js
Expand Up @@ -404,11 +404,10 @@ function skipPastDehydratedSuspenseInstance(
let suspenseState: null | SuspenseState = fiber.memoizedState;
let suspenseInstance: null | SuspenseInstance =
suspenseState !== null ? suspenseState.dehydrated : null;
invariant(
suspenseInstance,
'Expected to have a hydrated suspense instance. ' +
'This error is likely caused by a bug in React. Please file an issue.',
);
if (suspenseInstance === null) {
// This Suspense boundary was hydrated without a match.
return nextHydratableInstance;
}
return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh/package.json
Expand Up @@ -4,7 +4,7 @@
"keywords": [
"react"
],
"version": "0.4.2",
"version": "0.5.1",
"homepage": "https://reactjs.org/",
"bugs": "https://github.com/facebook/react/issues",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-test-renderer/package.json
@@ -1,6 +1,6 @@
{
"name": "react-test-renderer",
"version": "16.9.0",
"version": "16.10.1",
"description": "React package for snapshot testing.",
"main": "index.js",
"repository": {
Expand All @@ -22,7 +22,7 @@
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"react-is": "^16.8.6",
"scheduler": "^0.15.0"
"scheduler": "^0.16.1"
},
"peerDependencies": {
"react": "^16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Expand Up @@ -4,7 +4,7 @@
"keywords": [
"react"
],
"version": "16.9.0",
"version": "16.10.1",
"homepage": "https://reactjs.org/",
"bugs": "https://github.com/facebook/react/issues",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/package.json
@@ -1,6 +1,6 @@
{
"name": "scheduler",
"version": "0.15.0",
"version": "0.16.1",
"description": "Cooperative scheduler for the browser environment.",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/ReactVersion.js
Expand Up @@ -8,4 +8,4 @@
'use strict';

// TODO: this is special because it gets imported during build.
module.exports = '16.8.6';
module.exports = '16.10.1';
2 changes: 1 addition & 1 deletion packages/use-subscription/package.json
@@ -1,7 +1,7 @@
{
"name": "use-subscription",
"description": "Reusable hooks",
"version": "1.0.0",
"version": "1.1.1",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
Expand Down