',
+ {
+ runScripts: 'dangerously',
+ },
+ );
+ global.window = jsdom.window;
+ global.document = jsdom.window.document;
+ global.navigator = jsdom.window.navigator;
+ global.Node = jsdom.window.Node;
+
React = require('react');
ReactDOMClient = require('react-dom/client');
Scheduler = require('scheduler');
@@ -38,14 +51,6 @@ describe('useId', () => {
useId = React.useId;
useState = React.useState;
- // Test Environment
- const jsdom = new JSDOM(
- '
',
- {
- runScripts: 'dangerously',
- },
- );
- document = jsdom.window.document;
container = document.getElementById('container');
buffer = '';
diff --git a/packages/react-dom/src/__tests__/ReactDOMserverIntegrationProgress-test.js b/packages/react-dom/src/__tests__/ReactDOMserverIntegrationProgress-test.js
index e4b165836cc37..b05df4ae06276 100644
--- a/packages/react-dom/src/__tests__/ReactDOMserverIntegrationProgress-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMserverIntegrationProgress-test.js
@@ -5,12 +5,14 @@
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
+ * @jest-environment node
*/
'use strict';
const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
+let JSDOM;
let React;
let ReactDOM;
let ReactDOMServer;
@@ -19,6 +21,19 @@ let ReactTestUtils;
function initModules() {
// Reset warning cache.
jest.resetModules();
+ // Creating mixed environment for `react-dom` + `react-dom/server`
+ JSDOM = require('jsdom').JSDOM;
+ const jsdom = new JSDOM(
+ '
',
+ {
+ runScripts: 'dangerously',
+ },
+ );
+ global.window = jsdom.window;
+ global.document = jsdom.window.document;
+ global.navigator = jsdom.window.navigator;
+ global.Node = jsdom.window.Node;
+
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
diff --git a/packages/react-reconciler/src/DebugTracing.js b/packages/react-reconciler/src/DebugTracing.js
index ac13410c36231..74f74e24702fb 100644
--- a/packages/react-reconciler/src/DebugTracing.js
+++ b/packages/react-reconciler/src/DebugTracing.js
@@ -49,6 +49,7 @@ function log(...logArgs): void {
for (let i = printedGroupIndex + 1; i < pendingGroupArgs.length; i++) {
const groupArgs = pendingGroupArgs[i];
nativeConsole.group(...groupArgs);
+ // nativeConsoleLog(new Error().stack)
}
printedGroupIndex = pendingGroupArgs.length - 1;
}
diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js
index 8d357322ca3ac..07e036ff32996 100644
--- a/packages/shared/ReactVersion.js
+++ b/packages/shared/ReactVersion.js
@@ -1,16 +1 @@
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-// TODO: this is special because it gets imported during build.
-//
-// TODO: 17.0.3 has not been released to NPM;
-// It exists as a placeholder so that DevTools can support work tag changes between releases.
-// When we next publish a release (either 17.0.3 or 17.1.0), update the matching TODO in backend/renderer.js
-// TODO: This module is used both by the release scripts and to expose a version
-// at runtime. We should instead inject the version number as part of the build
-// process, and use the ReactVersions.js module as the single source of truth.
-export default '17.0.3';
+export default '18.0.0-rc.1-experimental-57820024ad-20220308';