Skip to content

Commit d475d77

Browse files
linting
1 parent d9d3b9c commit d475d77

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

packages/react-on-rails-pro/jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export default {
2828

2929
// Allow Jest to transform react-on-rails package from node_modules
3030
transformIgnorePatterns: ['node_modules/(?!react-on-rails)'],
31+
// RSC tests needs the node condition "react-server" to run
32+
// So, before running these tests, we set "NODE_CONDITIONS=react-server"
3133
testEnvironmentOptions: process.env.NODE_CONDITIONS
3234
? {
3335
customExportConditions: process.env.NODE_CONDITIONS.split(','),

packages/react-on-rails-pro/src/RSCRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const PromiseWrapper = ({ promise }: { promise: Promise<React.ReactNode> }) => {
8080
const promiseResult = React.use(promise);
8181

8282
// In case that an error happened during the rendering of the RSC payload before the rendering of the component itself starts
83-
// RSC bundle will return an error object serilaized inside the RSC payload
83+
// RSC bundle will return an error object serialized inside the RSC payload
8484
if (promiseResult instanceof Error) {
8585
throw promiseResult;
8686
}

script/convert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gsub_file_content(
4848
gsub_file_content(
4949
"../packages/react-on-rails-pro/package.json",
5050
/"test-rsc": "(?:\\"|[^"])*",/,
51-
'"test-rsc": "exit 0",',
51+
'"test-rsc": "exit 0",'
5252
)
5353
# Keep modern JSX transform for React 18+
5454
# gsub_file_content("../tsconfig.json", "react-jsx", "react")

0 commit comments

Comments
 (0)