@samitouri / QOS-React / commits / c0ee8e94b0

Fix typos in Turbopack configuration and in Node.js loader error messages (#30593)

<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Just fixing some copy-paste typos. ## How did you test this change? Untested.

Greg Brimble committed Aug 5, 2024 at 09:11 UTC c0ee8e94b049a8fb19dd3606a5a1cecc0cbc6a1b
4 files changed +11 -11
packages/react-server-dom-esm/src/ReactFlightESMNodeLoader.js
+2 -2
@@ -329,9 +329,9 @@ async function transformClientModule(
329 newSrc +=
330 'throw new Error(' +
331 JSON.stringify(
332 - `Attempted to call the default export of ${url} from the server` +
332 + `Attempted to call the default export of ${url} from the server ` +
333 `but it's on the client. It's not possible to invoke a client function from ` +
334 - `the server, it can only be rendered as a Component or passed to props of a` +
334 + `the server, it can only be rendered as a Component or passed to props of a ` +
335 `Client Component.`,
336 ) +
337 ');';
packages/react-server-dom-turbopack/src/ReactFlightTurbopackNodeLoader.js
+2 -2
@@ -329,9 +329,9 @@ async function transformClientModule(
329 newSrc +=
330 'throw new Error(' +
331 JSON.stringify(
332 - `Attempted to call the default export of ${url} from the server` +
332 + `Attempted to call the default export of ${url} from the server ` +
333 `but it's on the client. It's not possible to invoke a client function from ` +
334 - `the server, it can only be rendered as a Component or passed to props of a` +
334 + `the server, it can only be rendered as a Component or passed to props of a ` +
335 `Client Component.`,
336 ) +
337 ');';
packages/react-server-dom-webpack/src/ReactFlightWebpackNodeLoader.js
+2 -2
@@ -329,9 +329,9 @@ async function transformClientModule(
329 newSrc +=
330 'throw new Error(' +
331 JSON.stringify(
332 - `Attempted to call the default export of ${url} from the server` +
332 + `Attempted to call the default export of ${url} from the server ` +
333 `but it's on the client. It's not possible to invoke a client function from ` +
334 - `the server, it can only be rendered as a Component or passed to props of a` +
334 + `the server, it can only be rendered as a Component or passed to props of a ` +
335 `Client Component.`,
336 ) +
337 ');';
scripts/shared/inlinedHostConfigs.js
+5 -5
@@ -121,8 +121,8 @@ module.exports = [
121 'react-server-dom-turbopack/client.node.unbundled',
122 'react-server-dom-turbopack/server',
123 'react-server-dom-turbopack/server.node.unbundled',
124 - 'react-server-dom-turbopack/src/ReactFlightDOMServerNode.js', // react-server-dom-webpack/server.node.unbundled
125 - 'react-server-dom-turbopack/src/ReactFlightDOMClientNode.js', // react-server-dom-webpack/client.node.unbundled
124 + 'react-server-dom-turbopack/src/ReactFlightDOMServerNode.js', // react-server-dom-turbopack/server.node.unbundled
125 + 'react-server-dom-turbopack/src/ReactFlightDOMClientNode.js', // react-server-dom-turbopack/client.node.unbundled
126 'react-server-dom-turbopack/src/ReactFlightClientConfigBundlerNode.js',
127 'react-server-dom-turbopack/node-register',
128 'react-server-dom-turbopack/src/ReactFlightTurbopackNodeRegister.js',
@@ -162,7 +162,7 @@ module.exports = [
162 'react-server-dom-turbopack/server',
163 'react-server-dom-turbopack/server.node',
164 'react-server-dom-turbopack/src/ReactFlightDOMServerNode.js', // react-server-dom-turbopack/server.node
165 - 'react-server-dom-turbopack/src/ReactFlightDOMClientNode.js', // react-server-dom-webpack/client.node
165 + 'react-server-dom-turbopack/src/ReactFlightDOMClientNode.js', // react-server-dom-turbopack/client.node
166 'react-server-dom-turbopack/src/ReactFlightClientConfigBundlerTurbopack.js',
167 'react-server-dom-turbopack/src/ReactFlightClientConfigBundlerTurbopackServer.js',
168 'react-server-dom-turbopack/node-register',
@@ -371,8 +371,8 @@ module.exports = [
371 'react-server-dom-turbopack',
372 'react-server-dom-turbopack/client.edge',
373 'react-server-dom-turbopack/server.edge',
374 - 'react-server-dom-turbopack/src/ReactFlightDOMClientEdge.js', // react-server-dom-webpack/client.edge
375 - 'react-server-dom-turbopack/src/ReactFlightDOMServerEdge.js', // react-server-dom-webpack/server.edge
374 + 'react-server-dom-turbopack/src/ReactFlightDOMClientEdge.js', // react-server-dom-turbopack/client.edge
375 + 'react-server-dom-turbopack/src/ReactFlightDOMServerEdge.js', // react-server-dom-turbopack/server.edge
376 'react-server-dom-turbopack/src/ReactFlightClientConfigBundlerTurbopack.js',
377 'react-server-dom-turbopack/src/ReactFlightClientConfigBundlerTurbopackServer.js',
378 'react-devtools',