Conversation
* Introduced associations for `tsconfig.json` and related files to improve syntax highlighting and editing experience in VSCode.
- Added "test/utils" to pnpm workspace packages. - Updated dependencies in pnpm-workspace.yaml: - vitest-testdirs to ^4.1.1 - testdirs to ^3.1.1 - @cloudflare/vitest-pool-workers to ^0.8.61 - @luxass/eslint-config to ^5.3.0 - eslint to ^9.33.0 - @luxass/unicode-utils to ^0.11.0 - zod to ^4.0.16 - @ai-sdk/openai to ^2.0.7 - ai to ^5.0.8 - tsdown to ^0.13.4 - typescript to 5.9.2 - wrangler to ^4.28.1 - hono to ^4.9.0 - @cloudflare/workers-types to ^4.20250809.0 - vite to ^7.1.1 - @cloudflare/vite-plugin to ^1.11.2 - @tanstack/react-router to ^1.131.2 - @tanstack/react-router-devtools to ^1.131.2 - @tanstack/router-plugin to ^1.131.2 - Created new package @ucdjs/test-utils-internal with initial setup. - Updated tooling/tsconfig package.json with author info and scripts.
* Moved MSW server setup to `src/msw/global-setup.ts` for better structure. * Updated import paths in `msw.ts` to reflect new locations. * Created new ESLint configuration file for test utilities. * Removed obsolete `index.ts` file and added new `src/index.ts`. * Added TypeScript configuration for test utilities. * Updated Vitest configuration to use new paths for setup files. * Added LICENSE file for tooling configuration.
* Added `LICENSE` and `README.md` files for documentation and licensing. * Introduced `eslint.config.js` for ESLint configuration. * Created `src/factory.ts` for defining the base configuration and factory function. * Updated `package.json` to reflect new structure and added linting scripts. * Removed obsolete `index.ts` file. * Adjusted `tsconfig.json` to include only the `src` directory.
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Caution Review failedThe pull request is closed. WalkthroughThis change restructures internal test utility usage by introducing a new Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test File
participant Utils as @ucdjs/test-utils-internal/msw
participant MSW as MSW Server
Test->>Utils: import { mockFetch, HttpResponse }
Test->>Utils: call mockFetch(handler)
Utils->>MSW: register handler
Test->>MSW: execute test, MSW intercepts fetch
MSW->>Utils: use registered mock handler
MSW->>Test: return mocked response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Possibly related PRs
Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (44)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Preview Deployment for WebThe Web worker has been deployed successfully. Preview URL: https://preview.ucdjs.dev This preview was built from commit 27362e6 🤖 This comment will be updated automatically when you push new commits to this PR. |
Preview Deployment for ApiThe Api worker has been deployed successfully. Preview URL: https://preview.api.ucdjs.dev This preview was built from commit 27362e6 🤖 This comment will be updated automatically when you push new commits to this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This is not needed anymore, since we are using it from the package export
…W integration * Moved test-utils to the tooling directory for better organization. * Added `eslint.config.js` for linting configuration. * Created `package.json` for test-utils with dependencies and scripts. * Implemented `msw` setup in `global-setup.ts` for mocking server responses. * Introduced `mockFetch` utility in `msw.ts` for enhanced fetch mocking capabilities. * Updated TypeScript configuration files for the new structure.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the project's tooling infrastructure and creates a new internal test utilities package. The primary goal is to centralize test utilities while cleaning up existing tooling packages with improved configurations, documentation, and standardized structure.
- Migrates test utilities from
test/utilsto a new@ucdjs/test-utils-internalpackage - Restructures and enhances tooling packages (
tsdown-config,tsconfig,eslint-plugin) with better organization and documentation - Updates dependencies and configurations across the workspace
Reviewed Changes
Copilot reviewed 44 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Updates test setup to use new test-utils package and removes old alias |
| tooling/tsdown-config/* | Restructures package with src directory, adds factory function, and improves configuration |
| tooling/tsconfig/* | Enhances package metadata and updates path mappings for new test utilities |
| tooling/test-utils/* | Creates new internal test utilities package with MSW setup and documentation |
| tooling/eslint-plugin/* | Adds missing configuration files and documentation |
| test/utils/index.ts | Removes old test utilities (migrated to new package) |
| packages//test/ | Updates all test files to import from new test-utils package |
| pnpm-workspace.yaml | Updates dependency versions across the workspace |
🔗 Linked issue
📚 Description
This PR cleans some of the tooling projects up, and at the same time creates a new test utils package (currently named "test-utils-internal", since we may introduce a public test-utils package in the future).
By doing this we can introduce new test utilities that depends on other pieces, without interfering with the amount of dependencies in the root. Since root dependencies will allow sub packages to also import from there.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Chores