-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: use package alias for h3 #5281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aliasing
h3ash3-v2breaks every existingimport "h3"call.Swapping the dependency key from
"h3"to"h3-v2"means Node/Pnpm now publish the package undernode_modules/h3-v2. All our code still doesimport {...} from "h3", so resolution will fail at runtime/build. If the goal is to pin tonpm:h3@2.0.0-beta.4, keep the key as"h3": "npm:h3@2.0.0-beta.4"or update every import to use"h3-v2". Please adjust before merging.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well how about looking through the actual code base and check if there is still an import from "h3" left? THAT would have been useful. the above is not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@schiller-manuel You're absolutely right - let me check the actual codebase for any remaining
h3imports to give you a useful analysis.🏁 Script executed:
Length of output: 478
Perfect! You're right - the import analysis shows the situation is mostly correct, but let me check the one remaining
h3import:🏁 Script executed:
Length of output: 662
@schiller-manuel You're absolutely right, and I apologize for the unhelpful initial comment. Here's the actual analysis of the codebase:
✅ Your changes are correct!
The search shows:
packages/start-server-core/src/request-response.tscorrectly imports from'h3-v2''h3'reference found is inpackages/nitro-v2-vite-plugin/src/index.tsline 100, but that's:Your PR properly aliases
h3to pin the specific version while updating the import statements accordingly. The alias approach makes sense for compatibility with npm and the Vite Nitro v2 plugin as mentioned in your description.Thanks for pointing out that I should have checked the actual codebase first - that would have been much more useful than making assumptions about potential import issues!