');
});
it('should prefix html tags with a doctype', async () => {
- const html = await ReactHTML.renderToMarkup(
+ const html = await ReactMarkup.renderToMarkup(
// We can't use JSX because that's client-JSX in our tests.
React.createElement(
'html',
@@ -104,7 +104,7 @@ if (!__EXPERIMENTAL__) {
}
await expect(async () => {
- await ReactHTML.renderToMarkup(React.createElement(Component));
+ await ReactMarkup.renderToMarkup(React.createElement(Component));
}).rejects.toThrow();
});
@@ -116,7 +116,7 @@ if (!__EXPERIMENTAL__) {
}
await expect(async () => {
- await ReactHTML.renderToMarkup(React.createElement(Component));
+ await ReactMarkup.renderToMarkup(React.createElement(Component));
}).rejects.toThrow();
});
@@ -130,7 +130,7 @@ if (!__EXPERIMENTAL__) {
}
await expect(async () => {
- await ReactHTML.renderToMarkup(React.createElement(Component));
+ await ReactMarkup.renderToMarkup(React.createElement(Component));
}).rejects.toThrow();
});
@@ -173,7 +173,7 @@ if (!__EXPERIMENTAL__) {
);
}
- const html = await ReactHTML.renderToMarkup(
+ const html = await ReactMarkup.renderToMarkup(
React.createElement(Component),
);
const container = document.createElement('div');
@@ -204,7 +204,7 @@ if (!__EXPERIMENTAL__) {
return React.createElement('div', null, a, b);
}
- const html = await ReactHTML.renderToMarkup(
+ const html = await ReactMarkup.renderToMarkup(
React.createElement(Component),
);
expect(html).toBe('
00
');
@@ -225,7 +225,7 @@ if (!__EXPERIMENTAL__) {
}
await expect(async () => {
- await ReactHTML.renderToMarkup(
+ await ReactMarkup.renderToMarkup(
React.createElement('div', null, React.createElement(Foo)),
{
onError(error, errorInfo) {
diff --git a/packages/react-reconciler/src/forks/ReactFiberConfig.markup.js b/packages/react-reconciler/src/forks/ReactFiberConfig.markup.js
index 9f70eeb70e5bc..88d0c020bbe02 100644
--- a/packages/react-reconciler/src/forks/ReactFiberConfig.markup.js
+++ b/packages/react-reconciler/src/forks/ReactFiberConfig.markup.js
@@ -13,4 +13,4 @@ export * from 'react-dom-bindings/src/client/ReactFiberConfigDOM';
export * from 'react-client/src/ReactClientConsoleConfigBrowser';
// eslint-disable-next-line react-internal/prod-error-codes
-throw new Error('Fiber is not used in react-html');
+throw new Error('Fiber is not used in react-markup');
diff --git a/packages/react-server/src/forks/ReactFizzConfig.markup.js b/packages/react-server/src/forks/ReactFizzConfig.markup.js
index 15e35a2ef0b97..ed3fa90ff1532 100644
--- a/packages/react-server/src/forks/ReactFizzConfig.markup.js
+++ b/packages/react-server/src/forks/ReactFizzConfig.markup.js
@@ -8,7 +8,7 @@
*/
import type {Request} from 'react-server/src/ReactFizzServer';
-export * from 'react-html/src/ReactFizzConfigHTML.js';
+export * from 'react-markup/src/ReactFizzConfigMarkup.js';
export * from 'react-client/src/ReactClientConsoleConfigPlain';
diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json
index ba4fb4fa28428..b1286a7daf7c0 100644
--- a/scripts/error-codes/codes.json
+++ b/scripts/error-codes/codes.json
@@ -516,7 +516,7 @@
"528": "Expected not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different components render in the same slot or share the same key.%s",
"529": "Expected stylesheet with precedence to not be updated to a different kind of . Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different components render in the same slot or share the same key.%s",
"530": "The render was aborted by the server with a promise.",
- "531": "react-html is not supported outside a React Server Components environment.",
+ "531": "react-markup is not supported outside a React Server Components environment.",
"532": "Attempted to render a Client Component from renderToMarkup. This is not supported since it will never hydrate. Only render Server Components with renderToMarkup.",
"533": "Attempted to render a Server Action from renderToMarkup. This is not supported since it varies by version of the app. Use a fixed URL for any forms instead.",
"534": "renderToMarkup should not have emitted Client References. This is a bug in React.",
@@ -527,4 +527,4 @@
"539": "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams.",
"540": "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.",
"541": "Compared context values must be arrays"
-}
\ No newline at end of file
+}
diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js
index d17db8976390e..2b7841fc732f9 100644
--- a/scripts/rollup/bundles.js
+++ b/scripts/rollup/bundles.js
@@ -367,10 +367,10 @@ const bundles = [
{
bundleTypes: __EXPERIMENTAL__ ? [NODE_DEV, NODE_PROD] : [],
moduleType: RENDERER,
- entry: 'react-html/src/ReactHTMLServer.js',
- name: 'react-html.react-server',
+ entry: 'react-markup/src/ReactMarkupServer.js',
+ name: 'react-markup.react-server',
condition: 'react-server',
- global: 'ReactHTML',
+ global: 'ReactMarkup',
minifyWithProdErrorCodes: false,
wrapWithModuleBoundaries: false,
externals: ['react'],
@@ -380,9 +380,9 @@ const bundles = [
{
bundleTypes: __EXPERIMENTAL__ ? [NODE_DEV, NODE_PROD] : [],
moduleType: RENDERER,
- entry: 'react-html/src/ReactHTMLClient.js',
- name: 'react-html',
- global: 'ReactHTML',
+ entry: 'react-markup/src/ReactMarkupClient.js',
+ name: 'react-markup',
+ global: 'ReactMarkup',
minifyWithProdErrorCodes: false,
wrapWithModuleBoundaries: false,
externals: ['react'],
diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js
index 9dcbc6c0b77a5..8539ce7f7cc03 100644
--- a/scripts/rollup/forks.js
+++ b/scripts/rollup/forks.js
@@ -65,8 +65,8 @@ const forks = Object.freeze({
if (entry === 'react/src/ReactServer.js') {
return './packages/react/src/ReactSharedInternalsServer.js';
}
- if (entry === 'react-html/src/ReactHTMLServer.js') {
- // Inside the ReactHTMLServer render we don't refer to any shared internals
+ if (entry === 'react-markup/src/ReactMarkupServer.js') {
+ // Inside the ReactMarkupServer render we don't refer to any shared internals
// but instead use our own internal copy of the state because you cannot use
// any of this state from a component anyway. E.g. you can't use a client hook.
return './packages/react/src/ReactSharedInternalsClient.js';
@@ -100,8 +100,8 @@ const forks = Object.freeze({
entry === 'react-dom/src/ReactDOMFB.js' ||
entry === 'react-dom/src/ReactDOMTestingFB.js' ||
entry === 'react-dom/src/ReactDOMServer.js' ||
- entry === 'react-html/src/ReactHTMLClient.js' ||
- entry === 'react-html/src/ReactHTMLServer.js'
+ entry === 'react-markup/src/ReactMarkupClient.js' ||
+ entry === 'react-markup/src/ReactMarkupServer.js'
) {
if (
bundleType === FB_WWW_DEV ||
diff --git a/scripts/shared/inlinedHostConfigs.js b/scripts/shared/inlinedHostConfigs.js
index d59a9bde49170..9cc53fc379cb8 100644
--- a/scripts/shared/inlinedHostConfigs.js
+++ b/scripts/shared/inlinedHostConfigs.js
@@ -444,14 +444,14 @@ module.exports = [
{
shortName: 'markup',
entryPoints: [
- 'react-html/src/ReactHTMLClient.js', // react-html
- 'react-html/src/ReactHTMLServer.js', // react-html/react-html.react-server
+ 'react-markup/src/ReactMarkupClient.js', // react-markup
+ 'react-markup/src/ReactMarkupServer.js', // react-markup/react-markup.react-server
],
paths: [
'react-dom',
'react-dom/src/ReactDOMReactServer.js',
'react-dom-bindings',
- 'react-html',
+ 'react-markup',
'shared/ReactDOMSharedInternals',
],
isFlowTyped: true,