Skip to content

Commit

Permalink
chore(deps): update dev dependencies (#2830)
Browse files Browse the repository at this point in the history
* chore(deps): update dev dependencies

* fix: react basic&async tests

* change eslint exceptions

* Revert "change eslint exceptions"

This reverts commit a313108.

* Revert "fix: react basic&async tests"

This reverts commit 992e263.

* patch RTL and hack userEvent

* do not patch for old RTL

* test hack for react 18

* remove garbage in the patch

* update lock
  • Loading branch information
dai-shi authored Nov 20, 2024
1 parent 71d4a6b commit 6a854a9
Show file tree
Hide file tree
Showing 19 changed files with 457 additions and 332 deletions.
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 react@17.0.2 react-dom@17.0.2 @testing-library/react@12.1.4
- 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
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/react@12.1.4
run: |
pnpm json -I -f package.json -e "this.pnpm.patchedDependencies={};"
pnpm add -D @testing-library/react@12.1.4
- 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/user-event@12.1.7 @testing-library/react@11.0.4
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",
"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/react@16.0.1": "patches/@testing-library__react@16.0.1.patch"
}
}
}
22 changes: 22 additions & 0 deletions patches/@testing-library__react@16.0.1.patch
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)(() => {
if (hydrate) {
root.hydrate(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);
} else {
Loading

0 comments on commit 6a854a9

Please sign in to comment.