feat: migrate from connect to connect-next#144
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the project's underlying middleware framework from the unmaintained Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully migrates the project from the unmaintained connect package to its actively maintained fork, connect-next. The changes are well-contained and correctly update dependencies, type definitions, documentation, and tests. This is a valuable update for the project's long-term maintainability. I have one minor suggestion regarding the build configuration to ensure connect-next is handled consistently with other external dependencies.
There was a problem hiding this comment.
Pull request overview
Migrates @rspack/dev-server from the unmaintained connect package to connect-next for the default middleware app, updating runtime loading, exported types, and e2e test coverage to match.
Changes:
- Replace
connectwithconnect-nextin the dev server default app creation and in exported public types. - Update e2e app-matrix tests + snapshots to cover
connect-next. - Update docs and dependency/lockfile entries to remove
connect/@types/connectand addconnect-next.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/app.test.js | Switch test app variants from connect to connect-next via dynamic import factory. |
| tests/e2e/snapshots/app.test.js.snap | Snapshot key updates reflecting connect-next naming. |
| src/types.ts | Public type imports now come from connect-next. |
| src/server.ts | Default app loader now dynamically imports connect-next and awaits it during setup. |
| rslib.config.ts | Removes connect from externals (needs connect-next decision). |
| package.json | Swap connect for connect-next dependency; drop @types/connect. |
| pnpm-lock.yaml | Lock updates for dependency swap. |
| docs/migrate-v1-to-v2.md | Migration guide updated to reference connect-next as default app. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
rslib.config.ts:16
connectwas removed from theexternalslist, butconnect-nextis now a runtime dependency loaded insrc/server.ts. If the intent is to keepconnect-nextas an external runtime dependency (same as the previousconnectbehavior), add a correspondingconnect-next: 'commonjs connect-next'entry here; otherwise the server bundle may start inlining it inconsistently with prior releases.
output: {
externals: {
'connect-history-api-fallback':
'commonjs connect-history-api-fallback',
'webpack-dev-middleware': 'commonjs webpack-dev-middleware',
'http-proxy-middleware': 'commonjs http-proxy-middleware',
'serve-static': 'commonjs serve-static',
'serve-index': 'commonjs serve-index',
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace unmaintained
connectpackage with connect-next, an actively maintained fork with modern dependencies.Update imports, types, and tests accordingly. This provides better long-term maintenance and compatibility with newer Node.js versions.