From 16385c038e4330d94d3b5f3658db2072f7ec65da Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Fri, 18 Apr 2025 08:50:31 +0000 Subject: [PATCH 1/3] Remove act from render --- .../registerServerComponent.client.test.jsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/node_package/tests/registerServerComponent.client.test.jsx b/node_package/tests/registerServerComponent.client.test.jsx index 7b75ab38d4..ebd6a3c6c4 100644 --- a/node_package/tests/registerServerComponent.client.test.jsx +++ b/node_package/tests/registerServerComponent.client.test.jsx @@ -17,7 +17,7 @@ import { clear as clearComponentRegistry } from '../src/ComponentRegistry.ts'; enableFetchMocks(); // React Server Components tests require React 19 and only run with Node version 18 (`newest` in our CI matrix) -(getNodeVersion() >= 18 ? describe : describe.skip)('RSCClientRoot', () => { +(getNodeVersion() >= 18 ? describe : describe.skip)('registerServerComponent', () => { let container; const mockDomNodeId = 'test-container'; @@ -70,11 +70,10 @@ enableFetchMocks(); }; // Execute the render - const render = () => - act(async () => { - const Component = ReactOnRails.getComponent('TestComponent'); - await Component.component({}, railsContext, mockDomNodeId); - }); + const render = async () => { + const Component = ReactOnRails.getComponent('TestComponent'); + await Component.component({}, railsContext, mockDomNodeId); + }; return { render, @@ -92,7 +91,7 @@ enableFetchMocks(); await act(async () => { pushFirstChunk(); - render(); + await render(); }); expect(window.fetch).toHaveBeenCalledWith('/rsc-render/TestComponent?props=%7B%7D'); expect(window.fetch).toHaveBeenCalledTimes(1); @@ -113,7 +112,7 @@ enableFetchMocks(); const { render, pushFirstChunk, pushSecondChunk, endStream } = await mockRSCRequest(); await act(async () => { - render(); + await render(); pushFirstChunk(); }); expect(consoleSpy).toHaveBeenCalledWith( @@ -143,7 +142,7 @@ enableFetchMocks(); const { render, pushFirstChunk, pushSecondChunk, endStream } = await mockRSCRequest('/rsc-render/'); await act(async () => { - render(); + await render(); pushFirstChunk(); pushSecondChunk(); endStream(); From 7f0eddcc6b1b1d6757371776600effb8818aab75 Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Fri, 6 Jun 2025 11:54:34 +0000 Subject: [PATCH 2/3] Add eslint-plugin-testing-library --- eslint.config.ts | 9 +- node_package/tests/SuspenseHydration.test.tsx | 12 +- package.json | 3 +- yarn.lock | 183 ++++++++++-------- 4 files changed, 120 insertions(+), 87 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index d8f523101c..14f5cf639c 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -2,6 +2,7 @@ import path from 'node:path'; import { globalIgnores } from 'eslint/config'; import jest from 'eslint-plugin-jest'; import prettierRecommended from 'eslint-plugin-prettier/recommended'; +import testingLibrary from 'eslint-plugin-testing-library'; import globals from 'globals'; import tsEslint from 'typescript-eslint'; import { includeIgnoreFile } from '@eslint/compat'; @@ -198,11 +199,17 @@ const config = tsEslint.config([ { files: ['node_package/tests/**', '**/*.test.{js,jsx,ts,tsx}'], - extends: [jest.configs['flat/recommended'], jest.configs['flat/style']], + extends: [ + jest.configs['flat/recommended'], + jest.configs['flat/style'], + testingLibrary.configs['flat/dom'], + ], rules: { // Allows Jest mocks before import 'import/first': 'off', + // Avoiding these methods complicates tests and isn't useful for our purposes + 'testing-library/no-node-access': 'off', }, }, // must be the last config in the array diff --git a/node_package/tests/SuspenseHydration.test.tsx b/node_package/tests/SuspenseHydration.test.tsx index f42a14cf5c..187a42f7c5 100644 --- a/node_package/tests/SuspenseHydration.test.tsx +++ b/node_package/tests/SuspenseHydration.test.tsx @@ -167,9 +167,7 @@ async function renderAndHydrate() { hydrate(); await writeFirstChunk(); }); - await waitFor(() => { - expect(screen.queryByText('Loading...')).toBeInTheDocument(); - }); + expect(await screen.findByText('Loading...')).toBeInTheDocument(); expect(onContainerHydrated).toHaveBeenCalled(); // The async component is not hydrated until the second chunk is written to the document @@ -177,7 +175,7 @@ async function renderAndHydrate() { setTimeout(resolve, 1000); }); expect(onAsyncComponentHydrated).not.toHaveBeenCalled(); - expect(screen.queryByText('Loading...')).toBeInTheDocument(); + expect(screen.getByText('Loading...')).toBeInTheDocument(); expect(screen.queryByText('Hello World')).not.toBeInTheDocument(); }); @@ -189,9 +187,7 @@ async function renderAndHydrate() { hydrate(); await writeFirstChunk(); }); - await waitFor(() => { - expect(screen.queryByText('Loading...')).toBeInTheDocument(); - }); + expect(await screen.findByText('Loading...')).toBeInTheDocument(); await act(async () => { const secondChunk = await writeSecondChunk(); @@ -199,8 +195,8 @@ async function renderAndHydrate() { }); await waitFor(() => { expect(screen.queryByText('Loading...')).not.toBeInTheDocument(); - expect(screen.queryByText('Hello World')).toBeInTheDocument(); }); + expect(screen.getByText('Hello World')).toBeInTheDocument(); expect(onContainerHydrated).toHaveBeenCalled(); expect(onAsyncComponentHydrated).toHaveBeenCalled(); diff --git a/package.json b/package.json index 55cd86fea1..479a64ee38 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-react": "^7.37.4", "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-testing-library": "^7.5.3", "globals": "^16.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -71,7 +72,7 @@ "redux": "^4.2.1", "ts-jest": "^29.2.5", "typescript": "^5.8.3", - "typescript-eslint": "^8.29.1" + "typescript-eslint": "^8.35.0" }, "peerDependencies": { "react": ">= 16", diff --git a/yarn.lock b/yarn.lock index 0f8064f04d..55cd825c97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1061,10 +1061,10 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz#b0fc7e06d0c94f801537fd4237edc2706d3b8e4c" - integrity sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.7.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a" + integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw== dependencies: eslint-visitor-keys "^3.4.3" @@ -1695,86 +1695,102 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz#593639d9bb5239b2d877d65757b7e2c9100a2e84" - integrity sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg== +"@typescript-eslint/eslint-plugin@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz#515170100ff867445fe0a17ce05c14fc5fd9ca63" + integrity sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.29.1" - "@typescript-eslint/type-utils" "8.29.1" - "@typescript-eslint/utils" "8.29.1" - "@typescript-eslint/visitor-keys" "8.29.1" + "@typescript-eslint/scope-manager" "8.35.0" + "@typescript-eslint/type-utils" "8.35.0" + "@typescript-eslint/utils" "8.35.0" + "@typescript-eslint/visitor-keys" "8.35.0" graphemer "^1.4.0" - ignore "^5.3.1" + ignore "^7.0.0" natural-compare "^1.4.0" - ts-api-utils "^2.0.1" + ts-api-utils "^2.1.0" -"@typescript-eslint/parser@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.29.1.tgz#10bf37411be0a199c27b6515726e22fe8d3df8d0" - integrity sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg== +"@typescript-eslint/parser@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.35.0.tgz#20a0e17778a329a6072722f5ac418d4376b767d2" + integrity sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA== dependencies: - "@typescript-eslint/scope-manager" "8.29.1" - "@typescript-eslint/types" "8.29.1" - "@typescript-eslint/typescript-estree" "8.29.1" - "@typescript-eslint/visitor-keys" "8.29.1" + "@typescript-eslint/scope-manager" "8.35.0" + "@typescript-eslint/types" "8.35.0" + "@typescript-eslint/typescript-estree" "8.35.0" + "@typescript-eslint/visitor-keys" "8.35.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.29.1.tgz#cfdfd4144f20c38b9d3e430efd6480e297ef52f6" - integrity sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA== +"@typescript-eslint/project-service@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.35.0.tgz#00bd77e6845fbdb5684c6ab2d8a400a58dcfb07b" + integrity sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ== dependencies: - "@typescript-eslint/types" "8.29.1" - "@typescript-eslint/visitor-keys" "8.29.1" + "@typescript-eslint/tsconfig-utils" "^8.35.0" + "@typescript-eslint/types" "^8.35.0" + debug "^4.3.4" -"@typescript-eslint/type-utils@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.29.1.tgz#653dfff5c1711bc920a6a46a5a2c274899f00179" - integrity sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw== +"@typescript-eslint/scope-manager@8.35.0", "@typescript-eslint/scope-manager@^8.15.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz#8ccb2ab63383544fab98fc4b542d8d141259ff4f" + integrity sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA== dependencies: - "@typescript-eslint/typescript-estree" "8.29.1" - "@typescript-eslint/utils" "8.29.1" - debug "^4.3.4" - ts-api-utils "^2.0.1" + "@typescript-eslint/types" "8.35.0" + "@typescript-eslint/visitor-keys" "8.35.0" -"@typescript-eslint/types@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.29.1.tgz#984ed1283fedbfb41d3993a9abdcb7b299971500" - integrity sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ== +"@typescript-eslint/tsconfig-utils@8.35.0", "@typescript-eslint/tsconfig-utils@^8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz#6e05aeb999999e31d562ceb4fe144f3cbfbd670e" + integrity sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA== -"@typescript-eslint/typescript-estree@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.1.tgz#4ac085665ed5390d11c0e3426427978570e3b747" - integrity sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g== +"@typescript-eslint/type-utils@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz#0201eae9d83ffcc3451ef8c94f53ecfbf2319ecc" + integrity sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA== dependencies: - "@typescript-eslint/types" "8.29.1" - "@typescript-eslint/visitor-keys" "8.29.1" + "@typescript-eslint/typescript-estree" "8.35.0" + "@typescript-eslint/utils" "8.35.0" + debug "^4.3.4" + ts-api-utils "^2.1.0" + +"@typescript-eslint/types@8.35.0", "@typescript-eslint/types@^8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.35.0.tgz#e60d062907930e30008d796de5c4170f02618a93" + integrity sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ== + +"@typescript-eslint/typescript-estree@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz#86141e6c55b75bc1eaecc0781bd39704de14e52a" + integrity sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w== + dependencies: + "@typescript-eslint/project-service" "8.35.0" + "@typescript-eslint/tsconfig-utils" "8.35.0" + "@typescript-eslint/types" "8.35.0" + "@typescript-eslint/visitor-keys" "8.35.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" minimatch "^9.0.4" semver "^7.6.0" - ts-api-utils "^2.0.1" + ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.29.1", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.29.1.tgz#3d206c8c8def3527a8eb0588e94e3e60f7e167c9" - integrity sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA== +"@typescript-eslint/utils@8.35.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0", "@typescript-eslint/utils@^8.15.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.35.0.tgz#aaf0afab5ab51ea2f1897002907eacd9834606d5" + integrity sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg== dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.29.1" - "@typescript-eslint/types" "8.29.1" - "@typescript-eslint/typescript-estree" "8.29.1" + "@eslint-community/eslint-utils" "^4.7.0" + "@typescript-eslint/scope-manager" "8.35.0" + "@typescript-eslint/types" "8.35.0" + "@typescript-eslint/typescript-estree" "8.35.0" -"@typescript-eslint/visitor-keys@8.29.1": - version "8.29.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.1.tgz#9b74e5098c71138d42bbf2178fbe4dfad45d6b9a" - integrity sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg== +"@typescript-eslint/visitor-keys@8.35.0": + version "8.35.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz#93e905e7f1e94d26a79771d1b1eb0024cb159dbf" + integrity sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g== dependencies: - "@typescript-eslint/types" "8.29.1" - eslint-visitor-keys "^4.2.0" + "@typescript-eslint/types" "8.35.0" + eslint-visitor-keys "^4.2.1" abab@^2.0.6: version "2.0.6" @@ -3032,6 +3048,14 @@ eslint-plugin-react@^7.28.0, eslint-plugin-react@^7.37.4: string.prototype.matchall "^4.0.12" string.prototype.repeat "^1.0.0" +eslint-plugin-testing-library@^7.5.3: + version "7.5.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-7.5.3.tgz#d9d19acfccc1f5bae2ede05d1356587e68a3438a" + integrity sha512-sZk5hIrx0p1ehvdS2qHefKwXHiEysiQN+FMGCzES6xRNUgwI3q4KdWMeAwpPDP9u0RDkNzJpebRUnNch1sJh+A== + dependencies: + "@typescript-eslint/scope-manager" "^8.15.0" + "@typescript-eslint/utils" "^8.15.0" + eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -3058,10 +3082,10 @@ eslint-visitor-keys@^3.4.3: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" - integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== +eslint-visitor-keys@^4.2.0, eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== eslint@^9.22.0: version "9.22.0" @@ -3564,11 +3588,16 @@ iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ignore@^5.1.8, ignore@^5.2.0, ignore@^5.3.1: +ignore@^5.1.8, ignore@^5.2.0: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== +ignore@^7.0.0: + version "7.0.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" + integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== + import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -5896,10 +5925,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-api-utils@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.0.1.tgz#660729385b625b939aaa58054f45c058f33f10cd" - integrity sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w== +ts-api-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" + integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== ts-jest@^29.2.5: version "29.2.5" @@ -6000,14 +6029,14 @@ typed-array-length@^1.0.7: possible-typed-array-names "^1.0.0" reflect.getprototypeof "^1.0.6" -typescript-eslint@^8.29.1: - version "8.29.1" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.29.1.tgz#c0b205e542ade22f9027caaaa9c4ec31a202010f" - integrity sha512-f8cDkvndhbQMPcysk6CUSGBWV+g1utqdn71P5YKwMumVMOG/5k7cHq0KyG4O52nB0oKS4aN2Tp5+wB4APJGC+w== +typescript-eslint@^8.35.0: + version "8.35.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.35.0.tgz#65afcdde973614b8f44fa89293919420ca9b904e" + integrity sha512-uEnz70b7kBz6eg/j0Czy6K5NivaYopgxRjsnAJ2Fx5oTLo3wefTHIbL7AkQr1+7tJCRVpTs/wiM8JR/11Loq9A== dependencies: - "@typescript-eslint/eslint-plugin" "8.29.1" - "@typescript-eslint/parser" "8.29.1" - "@typescript-eslint/utils" "8.29.1" + "@typescript-eslint/eslint-plugin" "8.35.0" + "@typescript-eslint/parser" "8.35.0" + "@typescript-eslint/utils" "8.35.0" typescript@5.6.1-rc: version "5.6.1-rc" From 12497671f0154f56aa4e0b839400eb7056dec7a8 Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Fri, 6 Jun 2025 11:57:59 +0000 Subject: [PATCH 3/3] Remove more packages in convert script --- script/convert | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/script/convert b/script/convert index b900a4844d..bbc57bbaf1 100755 --- a/script/convert +++ b/script/convert @@ -21,16 +21,12 @@ gsub_file_content("../Gemfile.development_dependencies", /gem "shakapacker", "[^ gsub_file_content("../spec/dummy/package.json", /"shakapacker": "[^"]*",/, '"shakapacker": "6.6.0",') # The below packages don't work on the oldest supported Node version and aren't needed there anyway -gsub_file_content("../package.json", /"eslint": "[^"]*",/, "") -gsub_file_content("../package.json", /"eslint-plugin-jest": "[^"]*",/, "") +gsub_file_content("../package.json", /"[^"]*eslint[^"]*": "[^"]*",?/, "") gsub_file_content("../package.json", /"globals": "[^"]*",/, "") gsub_file_content("../package.json", /"knip": "[^"]*",/, "") gsub_file_content("../package.json", /"publint": "[^"]*",/, "") -gsub_file_content("../package.json", /"typescript-eslint": "[^"]*",?/, "") gsub_file_content("../package.json", %r{"@arethetypeswrong/cli": "[^"]*",}, "") -gsub_file_content("../package.json", %r{"@eslint/compat": "[^"]*",}, "") -gsub_file_content("../package.json", %r{"@testing-library/dom": "[^"]*",}, "") -gsub_file_content("../package.json", %r{"@testing-library/react": "[^"]*",}, "") +gsub_file_content("../package.json", %r{"@testing-library/[^"]*": "[^"]*",}, "") # Clean up any trailing commas before closing braces gsub_file_content("../package.json", /,(\s*})/, "\\1")