Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ReactVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
//
// The @latest channel uses the version as-is, e.g.:
//
// 19.1.0
// 19.2.0
//
// The @canary channel appends additional information, with the scheme
// <version>-<label>-<commit_sha>, e.g.:
//
// 19.1.0-canary-a1c2d3e4
// 19.2.0-canary-a1c2d3e4
//
// The @experimental channel doesn't include a version, only a date and a sha, e.g.:
//
Expand Down
2 changes: 1 addition & 1 deletion fixtures/flight/server/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
}

async function prerenderApp(res, returnValue, formState, noCache) {
const {unstable_prerenderToNodeStream: prerenderToNodeStream} = await import(
const {prerenderToNodeStream} = await import(
'react-server-dom-webpack/static'
);
// const m = require('../src/App.js');
Expand Down
4 changes: 2 additions & 2 deletions packages/react-art/package.json
Original file line number Diff line number Diff line change
@@ -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": "19.1.0",
"version": "19.2.0",
"main": "index.js",
"repository": {
"type": "git",
Expand All @@ -27,7 +27,7 @@
"scheduler": "^0.26.0"
},
"peerDependencies": {
"react": "^19.1.0"
"react": "^19.2.0"
},
"files": [
"LICENSE",
Expand Down
33 changes: 20 additions & 13 deletions packages/react-devtools-shared/src/__tests__/preprocessData-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,8 @@ let utils;
let assertLog;
let waitFor;

// This flag is on experimental which disables timeline profiler.
const enableComponentPerformanceTrack =
React.version.startsWith('19') && React.version.includes('experimental');

describe('Timeline profiler', () => {
if (enableComponentPerformanceTrack) {
test('no tests', () => {});
// Ignore all tests.
return;
}

describe('User Timing API', () => {
if (enableComponentPerformanceTrack) {
return;
}
let currentlyNotClearedMarks;
let registeredMarks;
let featureDetectionMarkName = null;
Expand Down Expand Up @@ -168,6 +155,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should return array of lane numbers from bitmask string', () => {
expect(getLanesFromTransportDecimalBitmask('1')).toEqual([0]);
expect(getLanesFromTransportDecimalBitmask('512')).toEqual([9]);
Expand All @@ -184,6 +172,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should return empty array if laneBitmaskString is not a bitmask', () => {
expect(getLanesFromTransportDecimalBitmask('')).toEqual([]);
expect(getLanesFromTransportDecimalBitmask('hello')).toEqual([]);
Expand All @@ -192,6 +181,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should ignore lanes outside REACT_TOTAL_NUM_LANES', () => {
const REACT_TOTAL_NUM_LANES =
require('react-devtools-timeline/src/constants').REACT_TOTAL_NUM_LANES;
Expand Down Expand Up @@ -317,11 +307,13 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should throw given an empty timeline', async () => {
await expect(async () => preprocessData([])).rejects.toThrow();
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should throw given a timeline with no Profile event', async () => {
const randomSample = createUserTimingEntry({
dur: 100,
Expand All @@ -338,6 +330,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should throw given a timeline without an explicit profiler version mark nor any other React marks', async () => {
const cpuProfilerSample = creactCpuProfilerSample();

Expand All @@ -349,6 +342,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should throw given a timeline with React scheduling marks, but without an explicit profiler version mark', async () => {
const cpuProfilerSample = creactCpuProfilerSample();
const scheduleRenderSample = createUserTimingEntry({
Expand All @@ -363,6 +357,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should return empty data given a timeline with no React scheduling profiling marks', async () => {
const cpuProfilerSample = creactCpuProfilerSample();
const randomSample = createUserTimingEntry({
Expand Down Expand Up @@ -467,6 +462,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should process legacy data format (before lane labels were added)', async () => {
const cpuProfilerSample = creactCpuProfilerSample();

Expand Down Expand Up @@ -854,6 +850,7 @@ describe('Timeline profiler', () => {
`);
});

// @reactVersion < 19.2
it('should process a sample createRoot render sequence', async () => {
function App() {
const [didMount, setDidMount] = React.useState(false);
Expand Down Expand Up @@ -1190,6 +1187,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should populate other user timing marks', async () => {
const userTimingData = createUserTimingData([]);
userTimingData.push(
Expand Down Expand Up @@ -1240,6 +1238,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.0
// @reactVersion < 19.2
it('should include a suspended resource "displayName" if one is set', async () => {
let promise = null;
let resolvedValue = null;
Expand Down Expand Up @@ -1381,6 +1380,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should not warn when React finishes a previously long (async) update with a short (sync) update inside of an event', async () => {
function Yield({id, value}) {
Scheduler.log(`${id}:${value}`);
Expand Down Expand Up @@ -1443,6 +1443,7 @@ describe('Timeline profiler', () => {

describe('nested updates', () => {
// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should not warn about short nested (state) updates during layout effects', async () => {
function Component() {
const [didMount, setDidMount] = React.useState(false);
Expand Down Expand Up @@ -1474,6 +1475,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should not warn about short (forced) updates during layout effects', async () => {
class Component extends React.Component {
_didMount: boolean = false;
Expand Down Expand Up @@ -1629,6 +1631,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should not warn about transition updates scheduled during commit phase', async () => {
function Component() {
const [value, setValue] = React.useState(0);
Expand Down Expand Up @@ -1770,6 +1773,7 @@ describe('Timeline profiler', () => {

describe('errors thrown while rendering', () => {
// @reactVersion >= 18.0
// @reactVersion < 19.2
it('shoult parse Errors thrown during render', async () => {
jest.spyOn(console, 'error');

Expand Down Expand Up @@ -1818,6 +1822,7 @@ describe('Timeline profiler', () => {
// This also tests an edge case where a component suspends while profiling
// before the first commit is logged (so the lane-to-labels map will not yet exist).
// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should warn about suspending during an update', async () => {
let promise = null;
let resolvedValue = null;
Expand Down Expand Up @@ -1884,6 +1889,7 @@ describe('Timeline profiler', () => {
});

// @reactVersion >= 18.2
// @reactVersion < 19.2
it('should not warn about suspending during an transition', async () => {
let promise = null;
let resolvedValue = null;
Expand Down Expand Up @@ -2152,6 +2158,7 @@ describe('Timeline profiler', () => {
`);
});

// @reactVersion < 19.2
it('should process a sample createRoot render sequence', async () => {
function App() {
const [didMount, setDidMount] = React.useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function setupHighlighter(
const nodes = renderer.findHostInstancesForElementID(id);
if (nodes != null) {
for (let i = 0; i < nodes.length; i++) {
const node = nodes[0];
const node = nodes[i];
if (node === null) {
continue;
}
Expand Down Expand Up @@ -164,7 +164,7 @@ export default function setupHighlighter(
const nodes = renderer.findHostInstancesForElementID(id);
if (nodes != null) {
for (let i = 0; i < nodes.length; i++) {
const node = nodes[0];
const node = nodes[i];
if (node === null) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function SuspenseBreadcrumbs(): React$Node {
key={id}
className={styles.SuspenseBreadcrumbsListItem}
aria-current={selectedSuspenseID === id}
onPointerEnter={highlightHostInstance.bind(null, id)}
onPointerEnter={highlightHostInstance.bind(null, id, false)}
onPointerLeave={clearHighlightHostInstance}>
<button
className={styles.SuspenseBreadcrumbsButton}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom-bindings/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-dom-bindings",
"description": "React implementation details for react-dom.",
"version": "19.1.0",
"version": "19.2.0",
"private": true,
"main": "index.js",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions packages/react-dom/npm/server.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToReadableStream = s.renderToReadableStream;
if (s.resume) {
exports.resume = s.resume;
}
exports.resume = s.resume;
4 changes: 1 addition & 3 deletions packages/react-dom/npm/server.bun.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ if (process.env.NODE_ENV === 'production') {

exports.version = b.version;
exports.renderToReadableStream = b.renderToReadableStream;
if (b.resume) {
exports.resume = b.resume;
}
exports.resume = b.resume;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
4 changes: 1 addition & 3 deletions packages/react-dom/npm/server.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ exports.version = b.version;
exports.renderToReadableStream = b.renderToReadableStream;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
if (b.resume) {
exports.resume = b.resume;
}
exports.resume = b.resume;
8 changes: 2 additions & 6 deletions packages/react-dom/npm/server.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@ exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToPipeableStream = s.renderToPipeableStream;
exports.renderToReadableStream = s.renderToReadableStream;
if (s.resumeToPipeableStream) {
exports.resumeToPipeableStream = s.resumeToPipeableStream;
}
if (s.resume) {
exports.resume = s.resume;
}
exports.resumeToPipeableStream = s.resumeToPipeableStream;
exports.resume = s.resume;
4 changes: 2 additions & 2 deletions packages/react-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-dom",
"version": "19.1.0",
"version": "19.2.0",
"description": "React package for working with the DOM.",
"main": "index.js",
"repository": {
Expand All @@ -20,7 +20,7 @@
"scheduler": "^0.26.0"
},
"peerDependencies": {
"react": "^19.1.0"
"react": "^19.2.0"
},
"files": [
"LICENSE",
Expand Down
10 changes: 10 additions & 0 deletions packages/react-dom/src/__tests__/ReactDOMFizzStatic-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,11 @@ describe('ReactDOMFizzStatic', () => {
return <div>aborted</div>;
}

const errors = [];
const pendingResult = ReactDOMFizzStatic.prerenderToNodeStream(<App />, {
onError: error => {
errors.push(error);
},
signal: controller.signal,
});
pendingResult.catch(() => {});
Expand All @@ -430,6 +434,7 @@ describe('ReactDOMFizzStatic', () => {
result.prelude.pipe(writable);
});
expect(getVisibleChildren(container)).toEqual(undefined);
expect(errors).toEqual([]);
});

// @gate enablePostpone
Expand All @@ -447,13 +452,18 @@ describe('ReactDOMFizzStatic', () => {
return <div>aborted</div>;
}

const errors = [];
const result = await ReactDOMFizzStatic.prerenderToNodeStream(<App />, {
onError: error => {
errors.push(error);
},
signal: controller.signal,
});
await act(async () => {
result.prelude.pipe(writable);
});
expect(getVisibleChildren(container)).toEqual(undefined);
expect(errors).toEqual([]);
});

// @gate enableHalt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ describe('ReactDOMFizzStaticFloat', () => {
React = require('react');
ReactDOM = require('react-dom');
ReactDOMFizzServer = require('react-dom/server.browser');
if (__EXPERIMENTAL__) {
ReactDOMFizzStatic = require('react-dom/static.browser');
}
ReactDOMFizzStatic = require('react-dom/static.browser');
Suspense = React.Suspense;
container = document.createElement('div');
document.body.appendChild(container);
Expand Down
Loading
Loading