diff --git a/package.json b/package.json index a6d2e98..741a9ef 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,7 @@ "lint": "rslint && prettier -c .", "lint:write": "rslint --fix && prettier -w .", "prepare": "simple-git-hooks", - "test": "pnpm run test:unit && pnpm run test:e2e", - "test:e2e": "playwright test --config=./test/playwright.config.ts", - "test:unit": "rstest --config=./test/rstest.config.ts" + "test": "rstest" }, "simple-git-hooks": { "pre-commit": "pnpm run lint:write" @@ -41,13 +39,13 @@ "json5": "^2.2.3" }, "devDependencies": { - "@playwright/test": "^1.61.1", "@rsbuild/core": "^2.1.2", "@rsbuild/plugin-react": "^2.1.0", "@rsbuild/plugin-type-check": "^1.5.0", "@rslib/core": "^0.23.1", "@rslint/core": "^0.6.4", - "@rstest/core": "^0.10.6", + "@rstest/core": "^0.11.1", + "@rstest/playwright": "^0.11.1", "@types/graphlib": "^2.1.12", "@types/node": "^24.13.2", "@types/react": "^19.2.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5d9dd5b..9ab5f9c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,18 +21,15 @@ importers: specifier: ^2.2.3 version: 2.2.3 devDependencies: - '@playwright/test': - specifier: ^1.61.1 - version: 1.61.1 '@rsbuild/core': specifier: ^2.1.2 version: 2.1.2 '@rsbuild/plugin-react': specifier: ^2.1.0 - version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rsbuild/plugin-type-check': specifier: ^1.5.0 - version: 1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) + version: 1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) '@rslib/core': specifier: ^0.23.1 version: 0.23.1(typescript@7.0.2) @@ -40,8 +37,11 @@ importers: specifier: ^0.6.4 version: 0.6.4 '@rstest/core': - specifier: ^0.10.6 - version: 0.10.6 + specifier: ^0.11.1 + version: 0.11.1 + '@rstest/playwright': + specifier: ^0.11.1 + version: 0.11.1(@rstest/core@0.11.1)(playwright@1.61.1) '@types/graphlib': specifier: ^2.1.12 version: 2.1.12 @@ -94,7 +94,7 @@ importers: version: link:../utils '@rsbuild/plugin-react': specifier: ^2.1.0 - version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rslib/core': specifier: 0.23.1 version: 0.23.1(typescript@6.0.3) @@ -116,19 +116,19 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: ^2.1.0 - version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + version: 2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rslib/core': specifier: ^0.23.1 version: 0.23.1(typescript@6.0.3) '@rspress/core': specifier: ^2.0.15 - version: 2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) + version: 2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) '@rspress/plugin-api-docgen': specifier: ^2.0.15 - version: 2.0.15(@rspress/core@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(@types/react@19.2.17)(react@19.2.7)(typescript@6.0.3) + version: 2.0.15(@rspress/core@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(@types/react@19.2.17)(react@19.2.7)(typescript@6.0.3) '@rspress/plugin-preview': specifier: ^2.0.15 - version: 2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@rspress/core@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(react-dom@19.1.1(react@19.2.7))(react@19.2.7) + version: 2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@rspress/core@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(react-dom@19.1.1(react@19.2.7))(react@19.2.7) '@types/node': specifier: ^24.13.2 version: 24.13.2 @@ -295,21 +295,12 @@ packages: resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} engines: {node: '>=6.9.0'} - '@emnapi/core@1.10.0': - resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} - '@emnapi/core@1.11.1': resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} - '@emnapi/runtime@1.10.0': - resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@emnapi/runtime@1.11.1': resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} - '@emnapi/wasi-threads@1.2.1': - resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@emnapi/wasi-threads@1.2.2': resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} @@ -470,25 +461,14 @@ packages: '@types/react': '>=16' react: '>=16' - '@napi-rs/wasm-runtime@1.1.4': - resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@napi-rs/wasm-runtime@1.1.6': resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} peerDependencies: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 - '@playwright/test@1.61.1': - resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==} - engines: {node: '>=18'} - hasBin: true - - '@rsbuild/core@2.0.15': - resolution: {integrity: sha512-O8vmMhZu1YImO6jOqt/K/vlJSvkq7UtSq5YM1DIlcEd9LW8Gf6/dkQ1B2KPI6F+hSMFBnTTTumdcIowSLCw97g==} + '@rsbuild/core@2.1.2': + resolution: {integrity: sha512-EP24Oj01bdwtw/Xl3LiaLe/WG6PBQV2yWbbCh+2TkMDc9dNHiyBTnR+/JZvGxI8RdO5qU0rH4YgMOJ6nVXIQSA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -497,8 +477,8 @@ packages: core-js: optional: true - '@rsbuild/core@2.1.2': - resolution: {integrity: sha512-EP24Oj01bdwtw/Xl3LiaLe/WG6PBQV2yWbbCh+2TkMDc9dNHiyBTnR+/JZvGxI8RdO5qU0rH4YgMOJ6nVXIQSA==} + '@rsbuild/core@2.1.5': + resolution: {integrity: sha512-7TW4U1SH7VxQZzSTIOzvwj5lo9uNTmGpsmTXFr4axQAE4giLDKP3kVUA1ZW4P3/Mz4QQJJyvZP29mVcb8kZCfg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -600,19 +580,14 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding-darwin-arm64@2.0.8': - resolution: {integrity: sha512-vCgbgH7B7qom+uID+RCZsTCOYFb9wC4/4+1U6rMfytrXGVJ72eNQs2tbdjOl0lb18CT3N/n+VkWynUiLk84GwA==} - cpu: [arm64] - os: [darwin] - '@rspack/binding-darwin-arm64@2.1.2': resolution: {integrity: sha512-IYcxareUOYJZz+uNMSIwn+iDRiVyjZNOjoxO/zL4OFaPK8Ncrw0ka/9DqL9Gd7OpnAXN1zK3uS8yD0O1yIYI3Q==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@2.0.8': - resolution: {integrity: sha512-satPm2PD4B7jDTVlVAdvMVdUszwLvWUEnUDzLb77mvVkezKNDZmuhb+e8s+FfKs8hJpNbZ9VAejuA2rr8o985w==} - cpu: [x64] + '@rspack/binding-darwin-arm64@2.1.3': + resolution: {integrity: sha512-oOGI0RSL89Ehu9T22rugmfUY9OC2eBqLMeWRYsu7bhlUrjoXeVfGBBSEXCse666BQ1sAiM8hD/k7nqVria/okQ==} + cpu: [arm64] os: [darwin] '@rspack/binding-darwin-x64@2.1.2': @@ -620,11 +595,10 @@ packages: cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@2.0.8': - resolution: {integrity: sha512-pSI+npPQE/uDtiboqvcOIRJbEV2+B+H1xffmko/gw50la92oTUW60kVULFwsb6L0+GVCzIcwX3yq60GtYIn+Ug==} - cpu: [arm64] - os: [linux] - libc: [glibc] + '@rspack/binding-darwin-x64@2.1.3': + resolution: {integrity: sha512-sVqWXNiFTMXAyN362y6IA+eJc8LXZKfHdhEJ/zDuMmRp+u2IvhgaF8tk3vX/OmeB9jydVjySijuiqk8No/FoCA==} + cpu: [x64] + os: [darwin] '@rspack/binding-linux-arm64-gnu@2.1.2': resolution: {integrity: sha512-My4m40tyJSgiCEf3bB2KIEX710q3nZg99LIjy+8Zxgi3oZTkg1bFmFRusFU5U4eN5408zfSqDDGvjDE3Yv7o4w==} @@ -632,11 +606,11 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-musl@2.0.8': - resolution: {integrity: sha512-igjJ43yxWQ72GZqjDDZSSHax9/Vg+6rLMmOvFglTJUkQpB4Tyvu/YjW+WRjYj2xRw6blOjLxUSJWASvuSqqlvg==} + '@rspack/binding-linux-arm64-gnu@2.1.3': + resolution: {integrity: sha512-aCy9Zli/2Qf+Ee5otXfFQ6mhv5fEyn0wIoBVmouqtJoqOO21et6UTtJ+LHLsMDolwGLyHERAljeSFSmYX3/O5A==} cpu: [arm64] os: [linux] - libc: [musl] + libc: [glibc] '@rspack/binding-linux-arm64-musl@2.1.2': resolution: {integrity: sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==} @@ -644,23 +618,35 @@ packages: os: [linux] libc: [musl] + '@rspack/binding-linux-arm64-musl@2.1.3': + resolution: {integrity: sha512-flIE7eluz0d21Fn28EVm3vPwoJooOSqtmjLFVSuOMcoCbwV9clfor195oIrAppp/W7dL/3XquFuVfrsa01Jy8Q==} + cpu: [arm64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-riscv64-gnu@2.1.2': resolution: {integrity: sha512-uys8Jyw8Z3ralvICbN/L/nZfy5qELIwpOY72rhIqhoDYwFcL4fmMaY7WsvUcJOjCB2rqOcWPaWKuF2oPvo9iDQ==} cpu: [riscv64] os: [linux] libc: [glibc] + '@rspack/binding-linux-riscv64-gnu@2.1.3': + resolution: {integrity: sha512-yojg8elye1nhsNeGncw0NrZ4pMGF7NVebR80CLg72TXyzfYwFJlFTdU5yUYb1Gy+JXIvrSCwzQt2QkyiEvmkfg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-riscv64-musl@2.1.2': resolution: {integrity: sha512-JYNVQwqCaRGQWvjHQYzZkIzQiwllMaJwh4Rdu3ww6W2OJcJUqT08sL1pkOtU0iCxT4VUYiRRcp93VGTGpHr8fg==} cpu: [riscv64] os: [linux] libc: [musl] - '@rspack/binding-linux-x64-gnu@2.0.8': - resolution: {integrity: sha512-zrkoEOnqj1hOEBO5T2I/2Ts2HSJsYFh1qXwMpK4dMJFGGNWDfNeUa6/LF5uq3VINF3JUl7RL47AgrucoSZJXPA==} - cpu: [x64] + '@rspack/binding-linux-riscv64-musl@2.1.3': + resolution: {integrity: sha512-6PvbXb3FOK4X3S5QGvoSW/sqExmsvAoPnQ/YSFrXvTphkXFezA7wnobmGBHT8JQP31hcFRzJHIZSIOKktzSzzg==} + cpu: [riscv64] os: [linux] - libc: [glibc] + libc: [musl] '@rspack/binding-linux-x64-gnu@2.1.2': resolution: {integrity: sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==} @@ -668,11 +654,11 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-musl@2.0.8': - resolution: {integrity: sha512-6CtDaGZjNDvJd9TBp7a9zABbrPORO21W96+3ZcGBn0YNUPUk4ARxIxrTTpeJ/1F41QDM8AYIkGDdqEYMqTYBsA==} + '@rspack/binding-linux-x64-gnu@2.1.3': + resolution: {integrity: sha512-lMXjoGKf0SnviH596fmTszgtnXLHmWOoE90G8grG9MvKVa3pelRmfps5ewZL9s8ENf3NXRfOxIhIf/M9as6MqA==} cpu: [x64] os: [linux] - libc: [musl] + libc: [glibc] '@rspack/binding-linux-x64-musl@2.1.2': resolution: {integrity: sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==} @@ -680,27 +666,28 @@ packages: os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@2.0.8': - resolution: {integrity: sha512-Yf4SiqTUroT5Ju+te0YAY2xxKOb35tECsO21v7hYyGa705wrgoAK/MmF7enOvs9GR1iZIqgiLD/wxsIxl8GjJw==} - cpu: [wasm32] + '@rspack/binding-linux-x64-musl@2.1.3': + resolution: {integrity: sha512-0esT35v7pW2ZsJTMc/zDUHwpNXlPqyUCyuiLJvrAAUcdENrgOVe4DmFrgVJ2hwqI4GjeN1VBnGRJ8c+edAHH5w==} + cpu: [x64] + os: [linux] + libc: [musl] '@rspack/binding-wasm32-wasi@2.1.2': resolution: {integrity: sha512-EB4SqH8DW/E/OmqssNQvnIVGQiVUyYNlA/pcc6Ia4MlTNwu6eNDppcNLrToH+kSZpL4CpHSFfSM3eIsSuar2Rw==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@2.0.8': - resolution: {integrity: sha512-8NCuiQsAhXrwRBy57QZoypqrws/zLBkaQVGiB8hksr6v++8hNigNjqpQARLbd0iyMuHsQQ++8+auGk6xlDXmzw==} - cpu: [arm64] - os: [win32] + '@rspack/binding-wasm32-wasi@2.1.3': + resolution: {integrity: sha512-UsrDjD59UEP0mhfN/Z+uTc3vLgiUvIr+mn92WC1sbQi9gtZohTYvaQYFhWuMkBqsACGcmZp704JAbbSrVrVYCA==} + cpu: [wasm32] '@rspack/binding-win32-arm64-msvc@2.1.2': resolution: {integrity: sha512-T6Fs/g32MRja/UpCq4AdyPRj8tA0cOkcEa4PrAcn/ztUgK8b/qMVxj5mhMI+n7k+kHZQnpeB1Q4HqdSJi6OocA==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@2.0.8': - resolution: {integrity: sha512-bxiekytbX7V9KFAra+HkwtNWC6pYfHEBBZFpiT0xUs3mCFOmAAFVBsBSQsoCP9AdCEXoMAvNdnrHNw3iov4OZw==} - cpu: [ia32] + '@rspack/binding-win32-arm64-msvc@2.1.3': + resolution: {integrity: sha512-42RS/SwKBTkNvXIPZXqTn0yEFN8zwGRfRe/ly0GDvPp/KxpLMFWxJmLxgtoLompU+0UCGvV4KpcBENt3oWs6BA==} + cpu: [arm64] os: [win32] '@rspack/binding-win32-ia32-msvc@2.1.2': @@ -708,9 +695,9 @@ packages: cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@2.0.8': - resolution: {integrity: sha512-7zPs8YCe/ZVJTwd+5lpB0CP0tkn2pONf/T1ycmVY76u21Nrwt8mXQGc/2yH2eWP4B7fikYBr3hGr7mpR2fajqQ==} - cpu: [x64] + '@rspack/binding-win32-ia32-msvc@2.1.3': + resolution: {integrity: sha512-thk43H1JHHbetNF3txcsGXeOwZi2m6Luf/uVUqNORXjxr5VV8woHAgaAx4QXVZRg70z1VDjd8mBWnHBnKI0FGA==} + cpu: [ia32] os: [win32] '@rspack/binding-win32-x64-msvc@2.1.2': @@ -718,14 +705,19 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding@2.0.8': - resolution: {integrity: sha512-3uZ+y8aQxq33ty2srMxg2Nu0XuBI6vVrG50rkDaXqwWqOohfgGUSfFuQK7EnSUNy4aFUQlCG6NHialQHJov0wg==} + '@rspack/binding-win32-x64-msvc@2.1.3': + resolution: {integrity: sha512-ObaUcj+BHo/aBL1weyM3orApaHyAR5Phr3YNEpQEifxjZbNKM1iO5X5prN4OqEv3H+7o5e/Wh9Fy3N7Vvd+psA==} + cpu: [x64] + os: [win32] '@rspack/binding@2.1.2': resolution: {integrity: sha512-/mFcRSUW7Pl19KeaBIujJvZYNJQu0wD5D3aa5h+Qcph26v7nmLYlX7eajIHGi8tt2qTZX1lXifw2KLIXKwYaRQ==} - '@rspack/core@2.0.8': - resolution: {integrity: sha512-+NLGJf8gZxihDmMFzjlly3toc2SMjeDmuvz0/Cai9AMdV4F+Pqcnt2BA9V4e3SY2jmhJQtPwgyyLtR1RiJO77g==} + '@rspack/binding@2.1.3': + resolution: {integrity: sha512-4UGXJqUHmm36tWG1GgFZz3p8sQ5JuSgWI+gq1xPPoihS41uYJL3cXuJnirTeWsmVrusmYZTQhgU3tl3VYGcJYg==} + + '@rspack/core@2.1.2': + resolution: {integrity: sha512-crpNQKhHfnzrIl4Sa4fjH30Ho5aAPgyqpmJZ41SkUFOzyKHdZKYfE5LF3CMh7MiFQFPPxiiKf5BcpxmtZZx4MQ==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -736,8 +728,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@2.1.2': - resolution: {integrity: sha512-crpNQKhHfnzrIl4Sa4fjH30Ho5aAPgyqpmJZ41SkUFOzyKHdZKYfE5LF3CMh7MiFQFPPxiiKf5BcpxmtZZx4MQ==} + '@rspack/core@2.1.3': + resolution: {integrity: sha512-1iGnxLrP+iyY0ZSjLZeQTaxrISpQz4yLyqJPmaF/l4uw27/dBcrloszAeLOJQ9jiv7EJtU0T5zB+LOFPpivIxA==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -795,8 +787,8 @@ packages: '@rspress/shared@2.0.15': resolution: {integrity: sha512-o8aYwEzNuTmWnmKe91ntPv+34u3RbtAe+rcK9XC5MANOlgncwOaCs3bUa8/B1/llwyLoNgrpi+VB9bEiU11ZRQ==} - '@rstest/core@0.10.6': - resolution: {integrity: sha512-nX61dw2Tnxfwy/jGZEuNbh2tzapgaH6Iwj4Aw5d2wxUwxptUL3ddUxFF5M1ZSWoLEVG30VaPg3ITzrSo5sdbTg==} + '@rstest/core@0.11.1': + resolution: {integrity: sha512-9iJnDrM/zYuHyk1//CMr/Jer2XughgN3fYagGb1YWpMLUke+E+WXlUPgACwf7OkmIB47/TttbLFK+4zwGDNOFg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -808,6 +800,13 @@ packages: jsdom: optional: true + '@rstest/playwright@0.11.1': + resolution: {integrity: sha512-VhA5SvfYTdC9nJ572Q5NfR8OqcHWr9Agd9zWrkSCBC3sQDwuWLiZTTX4wAv8hMwRtDGzNG0otUPTDrCQ1r0hWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rstest/core': workspace:^ + playwright: ^1.49.1 + '@shikijs/core@4.3.0': resolution: {integrity: sha512-EooU3i9F6IAE8kEu+AnGf9DFZWkQBZ+hJn3tLVbsH+61mtQiva5biai66fAA6nvFPXkLgvrh7BrR7YcJU83xQQ==} engines: {node: '>=20'} @@ -846,9 +845,6 @@ packages: '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} - '@tybys/wasm-util@0.10.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} - '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} @@ -2711,33 +2707,17 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@emnapi/core@1.10.0': - dependencies: - '@emnapi/wasi-threads': 1.2.1 - tslib: 2.8.1 - optional: true - '@emnapi/core@1.11.1': dependencies: '@emnapi/wasi-threads': 1.2.2 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.10.0': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.11.1': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.2.1': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/wasi-threads@1.2.2': dependencies: tslib: 2.8.1 @@ -2940,13 +2920,6 @@ snapshots: '@types/react': 19.2.17 react: 19.2.7 - '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@tybys/wasm-util': 0.10.1 - optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': dependencies: '@emnapi/core': 1.11.1 @@ -2954,48 +2927,44 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@playwright/test@1.61.1': - dependencies: - playwright: 1.61.1 - - '@rsbuild/core@2.0.15': + '@rsbuild/core@2.1.2': dependencies: - '@rspack/core': 2.0.8(@swc/helpers@0.5.23) + '@rspack/core': 2.1.2(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/core@2.1.2': + '@rsbuild/core@2.1.5': dependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/plugin-react@2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))': + '@rsbuild/plugin-react@2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))': dependencies: - '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.1.2(@swc/helpers@0.5.23))(react-refresh@0.18.0) + '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.1.3(@swc/helpers@0.5.23))(react-refresh@0.18.0) react-refresh: 0.18.0 optionalDependencies: '@rsbuild/core': 2.1.2 transitivePeerDependencies: - '@rspack/core' - '@rsbuild/plugin-react@2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))': + '@rsbuild/plugin-react@2.1.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))': dependencies: - '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.1.2(@swc/helpers@0.5.23))(react-refresh@0.18.0) + '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.1.3(@swc/helpers@0.5.23))(react-refresh@0.18.0) react-refresh: 0.18.0 optionalDependencies: '@rsbuild/core': 2.1.2 transitivePeerDependencies: - '@rspack/core' - '@rsbuild/plugin-type-check@1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2)': + '@rsbuild/plugin-type-check@1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2)': dependencies: deepmerge: 4.3.1 json5: 2.2.3 reduce-configs: 1.1.2 - ts-checker-rspack-plugin: 1.5.1(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) + ts-checker-rspack-plugin: 1.5.1(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) optionalDependencies: '@rsbuild/core': 2.1.2 transitivePeerDependencies: @@ -3062,53 +3031,52 @@ snapshots: '@rslint/native-win32-x64-msvc@0.6.4': optional: true - '@rspack/binding-darwin-arm64@2.0.8': - optional: true - '@rspack/binding-darwin-arm64@2.1.2': optional: true - '@rspack/binding-darwin-x64@2.0.8': + '@rspack/binding-darwin-arm64@2.1.3': optional: true '@rspack/binding-darwin-x64@2.1.2': optional: true - '@rspack/binding-linux-arm64-gnu@2.0.8': + '@rspack/binding-darwin-x64@2.1.3': optional: true '@rspack/binding-linux-arm64-gnu@2.1.2': optional: true - '@rspack/binding-linux-arm64-musl@2.0.8': + '@rspack/binding-linux-arm64-gnu@2.1.3': optional: true '@rspack/binding-linux-arm64-musl@2.1.2': optional: true + '@rspack/binding-linux-arm64-musl@2.1.3': + optional: true + '@rspack/binding-linux-riscv64-gnu@2.1.2': optional: true + '@rspack/binding-linux-riscv64-gnu@2.1.3': + optional: true + '@rspack/binding-linux-riscv64-musl@2.1.2': optional: true - '@rspack/binding-linux-x64-gnu@2.0.8': + '@rspack/binding-linux-riscv64-musl@2.1.3': optional: true '@rspack/binding-linux-x64-gnu@2.1.2': optional: true - '@rspack/binding-linux-x64-musl@2.0.8': + '@rspack/binding-linux-x64-gnu@2.1.3': optional: true '@rspack/binding-linux-x64-musl@2.1.2': optional: true - '@rspack/binding-wasm32-wasi@2.0.8': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@rspack/binding-linux-x64-musl@2.1.3': optional: true '@rspack/binding-wasm32-wasi@2.1.2': @@ -3118,36 +3086,30 @@ snapshots: '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true - '@rspack/binding-win32-arm64-msvc@2.0.8': + '@rspack/binding-wasm32-wasi@2.1.3': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true '@rspack/binding-win32-arm64-msvc@2.1.2': optional: true - '@rspack/binding-win32-ia32-msvc@2.0.8': + '@rspack/binding-win32-arm64-msvc@2.1.3': optional: true '@rspack/binding-win32-ia32-msvc@2.1.2': optional: true - '@rspack/binding-win32-x64-msvc@2.0.8': + '@rspack/binding-win32-ia32-msvc@2.1.3': optional: true '@rspack/binding-win32-x64-msvc@2.1.2': optional: true - '@rspack/binding@2.0.8': - optionalDependencies: - '@rspack/binding-darwin-arm64': 2.0.8 - '@rspack/binding-darwin-x64': 2.0.8 - '@rspack/binding-linux-arm64-gnu': 2.0.8 - '@rspack/binding-linux-arm64-musl': 2.0.8 - '@rspack/binding-linux-x64-gnu': 2.0.8 - '@rspack/binding-linux-x64-musl': 2.0.8 - '@rspack/binding-wasm32-wasi': 2.0.8 - '@rspack/binding-win32-arm64-msvc': 2.0.8 - '@rspack/binding-win32-ia32-msvc': 2.0.8 - '@rspack/binding-win32-x64-msvc': 2.0.8 + '@rspack/binding-win32-x64-msvc@2.1.3': + optional: true '@rspack/binding@2.1.2': optionalDependencies: @@ -3164,11 +3126,20 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.1.2 '@rspack/binding-win32-x64-msvc': 2.1.2 - '@rspack/core@2.0.8(@swc/helpers@0.5.23)': - dependencies: - '@rspack/binding': 2.0.8 + '@rspack/binding@2.1.3': optionalDependencies: - '@swc/helpers': 0.5.23 + '@rspack/binding-darwin-arm64': 2.1.3 + '@rspack/binding-darwin-x64': 2.1.3 + '@rspack/binding-linux-arm64-gnu': 2.1.3 + '@rspack/binding-linux-arm64-musl': 2.1.3 + '@rspack/binding-linux-riscv64-gnu': 2.1.3 + '@rspack/binding-linux-riscv64-musl': 2.1.3 + '@rspack/binding-linux-x64-gnu': 2.1.3 + '@rspack/binding-linux-x64-musl': 2.1.3 + '@rspack/binding-wasm32-wasi': 2.1.3 + '@rspack/binding-win32-arm64-msvc': 2.1.3 + '@rspack/binding-win32-ia32-msvc': 2.1.3 + '@rspack/binding-win32-x64-msvc': 2.1.3 '@rspack/core@2.1.2(@swc/helpers@0.5.23)': dependencies: @@ -3176,26 +3147,32 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.23 + '@rspack/core@2.1.3(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.1.3 + optionalDependencies: + '@swc/helpers': 0.5.23 + '@rspack/lite-tapable@1.1.2': {} - '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.1.2(@swc/helpers@0.5.23))(react-refresh@0.18.0)': + '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.1.3(@swc/helpers@0.5.23))(react-refresh@0.18.0)': dependencies: react-refresh: 0.18.0 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) - '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.1.2(@swc/helpers@0.5.23))(react-refresh@0.18.0)': + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.1.3(@swc/helpers@0.5.23))(react-refresh@0.18.0)': dependencies: react-refresh: 0.18.0 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) - '@rspress/core@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2)': + '@rspress/core@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2)': dependencies: '@mdx-js/mdx': 3.1.1 '@mdx-js/react': 3.1.1(@types/react@19.2.17)(react@19.2.7) '@rsbuild/core': 2.1.2 - '@rsbuild/plugin-react': 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + '@rsbuild/plugin-react': 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rspress/shared': 2.0.15 '@shikijs/rehype': 4.3.0 '@types/unist': 3.0.3 @@ -3240,9 +3217,9 @@ snapshots: - micromark-util-types - supports-color - '@rspress/plugin-api-docgen@2.0.15(@rspress/core@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(@types/react@19.2.17)(react@19.2.7)(typescript@6.0.3)': + '@rspress/plugin-api-docgen@2.0.15(@rspress/core@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(@types/react@19.2.17)(react@19.2.7)(typescript@6.0.3)': dependencies: - '@rspress/core': 2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) + '@rspress/core': 2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) documentation: 14.0.3 github-slugger: 2.0.0 react-docgen-typescript: 2.4.0(typescript@6.0.3) @@ -3257,11 +3234,11 @@ snapshots: - react - supports-color - '@rspress/plugin-preview@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@rspress/core@2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(react-dom@19.1.1(react@19.2.7))(react@19.2.7)': + '@rspress/plugin-preview@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@rspress/core@2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2))(react-dom@19.1.1(react@19.2.7))(react@19.2.7)': dependencies: '@rsbuild/core': 2.1.2 - '@rsbuild/plugin-react': 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) - '@rspress/core': 2.0.15(@rspack/core@2.1.2(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) + '@rsbuild/plugin-react': 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) + '@rspress/core': 2.0.15(@rspack/core@2.1.3(@swc/helpers@0.5.23))(@types/mdast@4.0.4)(@types/react@19.2.17)(micromark-util-types@2.0.2)(micromark@4.0.2) picocolors: 1.1.1 qrcode.react: 4.2.0(react@19.2.7) react: 19.2.7 @@ -3280,14 +3257,19 @@ snapshots: - '@module-federation/runtime-tools' - core-js - '@rstest/core@0.10.6': + '@rstest/core@0.11.1': dependencies: - '@rsbuild/core': 2.0.15 + '@rsbuild/core': 2.1.5 '@types/chai': 5.2.3 transitivePeerDependencies: - '@module-federation/runtime-tools' - core-js + '@rstest/playwright@0.11.1(@rstest/core@0.11.1)(playwright@1.61.1)': + dependencies: + '@rstest/core': 0.11.1 + playwright: 1.61.1 + '@shikijs/core@4.3.0': dependencies: '@shikijs/primitive': 4.3.0 @@ -3341,11 +3323,6 @@ snapshots: dependencies: tslib: 2.8.1 - '@tybys/wasm-util@0.10.1': - dependencies: - tslib: 2.8.1 - optional: true - '@tybys/wasm-util@0.10.3': dependencies: tslib: 2.8.1 @@ -5496,7 +5473,7 @@ snapshots: trough@2.2.0: {} - ts-checker-rspack-plugin@1.5.1(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2): + ts-checker-rspack-plugin@1.5.1(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2): dependencies: '@rspack/lite-tapable': 1.1.2 chokidar: 3.6.0 @@ -5504,7 +5481,7 @@ snapshots: picocolors: 1.1.1 typescript: 7.0.2 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) transitivePeerDependencies: - tslib diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 14987c0..721e58e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -8,3 +8,4 @@ allowBuilds: minimumReleaseAgeExclude: - typescript - '@typescript/*' + - '@rstest/*' diff --git a/rstest.config.ts b/rstest.config.ts new file mode 100644 index 0000000..ecac5ec --- /dev/null +++ b/rstest.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from '@rstest/core'; + +export default defineConfig({ + env: { + // Let Rsbuild choose the mode based on the command. + NODE_ENV: undefined, + }, + retry: process.env.CI ? 3 : 0, + testTimeout: 10_000, +}); diff --git a/test/index.pw.test.ts b/test/e2e.test.ts similarity index 97% rename from test/index.pw.test.ts rename to test/e2e.test.ts index 47a5d27..5fd2103 100644 --- a/test/index.pw.test.ts +++ b/test/e2e.test.ts @@ -1,7 +1,7 @@ import { spawn } from 'node:child_process'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { TEST_SUIT_STARTED } from './constant.js'; diff --git a/test/playwright.config.ts b/test/playwright.config.ts deleted file mode 100644 index c82fdab..0000000 --- a/test/playwright.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from '@playwright/test'; - -export default defineConfig({ - // Playwright test files with `.pw.` to distinguish from Rstest test files - testMatch: /.*pw.(test|spec).(js|ts|mjs)/, - // Retry on CI - retries: process.env.CI ? 3 : 0, - // Print line for each test being run in CI - reporter: 'list', - expect: { - timeout: process.env.CI ? 10_000 : 5_000, - }, -}); diff --git a/test/rstest.config.ts b/test/rstest.config.ts deleted file mode 100644 index 7f85f06..0000000 --- a/test/rstest.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from '@rstest/core'; - -export default defineConfig({ - name: 'integration', - include: ['./**/*.test.ts'], - exclude: ['**/node_modules/**', './**/*.pw.test.ts'], // Exclude Playwright tests -});