Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dev dependencies #2830

Merged
merged 11 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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
1 change: 1 addition & 0 deletions .github/workflows/test-multiple-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- name: Use React 17 for production test
if: ${{ matrix.env == 'production' }}
run: |
pnpm json -I -f package.json -e "this.pnpm.patchedDependencies={};"
pnpm add -D [email protected] [email protected] @testing-library/[email protected]
- name: Patch for DEV-ONLY
if: ${{ matrix.env == 'development' }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test-multiple-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- 18.1.0
- 18.2.0
- 18.3.1
- 19.0.0-rc.0
- 19.0.0-rc-5c56b873-20241107
- 0.0.0-experimental-5c56b873-20241107
- 19.0.0-rc.1
- 19.0.0-rc-e1ef8c95-20241115
- 0.0.0-experimental-e1ef8c95-20241115
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the list of commits for the change:

facebook/react@5c56b87...e1ef8c9

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More precisely, it's between these commit that cause the error:
facebook/react@380f5d6...b01722d

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, enableSiblingPrerendering should only be the meaningful change.

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
Expand All @@ -47,7 +47,9 @@ jobs:
- run: pnpm install --frozen-lockfile
- name: Install legacy testing-library
if: ${{ startsWith(matrix.react, '16.') || startsWith(matrix.react, '17.') }}
run: pnpm add -D @testing-library/[email protected]
run: |
pnpm json -I -f package.json -e "this.pnpm.patchedDependencies={};"
pnpm add -D @testing-library/[email protected]
- name: Patch for React 16
if: ${{ startsWith(matrix.react, '16.') }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-old-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
- name: Patch testing setup for older TS
if: ${{ matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }}
run: |
pnpm json -I -f package.json -e "this.pnpm.patchedDependencies={};"
pnpm add -D @testing-library/[email protected] @testing-library/[email protected]
rm node_modules/vitest/dist/*.d.ts
echo "declare module 'vitest'" >> ./src/types.d.ts
Expand Down
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitest/coverage-v8": "^2.1.4",
"@vitest/eslint-plugin": "^1.1.8",
"@vitest/ui": "^2.1.4",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@vitest/coverage-v8": "^2.1.5",
"@vitest/eslint-plugin": "^1.1.10",
"@vitest/ui": "^2.1.5",
"benny": "^3.7.1",
"downlevel-dts": "^0.11.0",
"esbuild": "^0.24.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jest-dom": "^5.5.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
Expand All @@ -158,17 +158,17 @@
"jsdom": "^25.0.1",
"json": "^11.0.0",
"prettier": "^3.3.3",
"react": "19.0.0-rc.0",
"react-dom": "19.0.0-rc.0",
"rollup": "^4.25.0",
"react": "19.0.0-rc.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating react to rc.1 makes tests to fail.

@kretajak I wonder if you are familiar with this case. Do we misuse RTL for async tests?

Copy link
Contributor

@kretajak kretajak Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look at that. The way RTL is used here to test async stuff is fine from my perspective.

Copy link
Contributor

@kretajak kretajak Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like broken tests are using Suspense and Suspense behavior was changed in RC1 (facebook/react#29898 (comment)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look. I know the Suspense behavior was changed, but didn't consider if it really broke it.

https://stackblitz.com/edit/vitejs-vite-hbi7w9?file=src%2FApp.tsx&terminal=dev This looks like working. So, it's probably test only issue.

"react-dom": "19.0.0-rc.1",
"rollup": "^4.27.2",
"rollup-plugin-banner2": "^1.3.0",
"rollup-plugin-esbuild": "^6.1.1",
"rxjs": "^7.8.1",
"shelljs": "^0.8.5",
"shx": "^0.3.4",
"ts-expect": "^1.3.0",
"typescript": "^5.6.3",
"vitest": "^2.1.4",
"vitest": "^2.1.5",
"wonka": "^6.3.4"
},
"peerDependencies": {
Expand All @@ -182,5 +182,10 @@
"react": {
"optional": true
}
},
"pnpm": {
"patchedDependencies": {
"@testing-library/[email protected]": "patches/@[email protected]"
}
}
}
22 changes: 22 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/dist/pure.js b/dist/pure.js
index 7b62fa743198d1928e02501cc99f5dd7c230e9a6..757cbc4f46ae9fce59cb770da88ebb34b3daf2af 100644
--- a/dist/pure.js
+++ b/dist/pure.js
@@ -169,7 +169,7 @@ function createLegacyRoot(container) {
}
};
}
-function renderRoot(ui, {
+async function renderRoot(ui, {
baseElement,
container,
hydrate,
@@ -177,7 +177,7 @@ function renderRoot(ui, {
root,
wrapper: WrapperComponent
}) {
- (0, _actCompat.default)(() => {
+ await (0, _actCompat.default)(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it turns out, this helps.

if (hydrate) {
root.hydrate(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);
} else {
Loading