Skip to content

Conversation

@schiller-manuel
Copy link
Contributor

@schiller-manuel schiller-manuel commented Sep 28, 2025

this should help compatibility with npm and the vite nitro v2 plugin

Summary by CodeRabbit

  • Chores
    • Updated an internal dependency by switching to an aliased package name while keeping the same version (2.0.0-beta.4); no functional or API changes are expected.
    • No other dependencies, public interfaces, or runtime behaviors were modified; installation, compatibility, and build/deploy workflows remain unchanged.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Walkthrough

Replaced direct dependency and imports from h3 with an aliased package h3-v2 (pointing to npm:h3@2.0.0-beta.4) in the package manifest and updated source import; no API/export changes.

Changes

Cohort / File(s) Summary of Changes
Dependency alias update
packages/start-server-core/package.json
Replaced dependency name h3 with aliased h3-v2 targeting npm:h3@2.0.0-beta.4.
Imports updated
packages/start-server-core/src/request-response.ts
Changed imports from 'h3' to 'h3-v2' for session/request utilities; no other code changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through lines with whiskered glee,
swapped a name, left the core to be—
h3 wears a ribbon, now h3-v2 bright,
same crunch, new tag, snug and light. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “fix: use package alias for h3” accurately and concisely describes the primary change of replacing the h3 dependency with an aliased package, and it’s clear and specific enough for teammates to understand the intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch h3-package-alias

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45a699a and c9f393c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/start-server-core/package.json (1 hunks)
  • packages/start-server-core/src/request-response.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/start-server-core/package.json
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/start-server-core/src/request-response.ts
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/start-server-core/src/request-response.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test
  • GitHub Check: Preview
🔇 Additional comments (1)
packages/start-server-core/src/request-response.ts (1)

3-22: Import aligns with new alias dependency.

Switching the import to 'h3-v2' matches the package alias introduced in the manifest, so the module resolution will pick up the intended H3 build without further code changes.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Sep 28, 2025

View your CI Pipeline Execution ↗ for commit c9f393c

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 4m 34s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 20s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-28 18:53:08 UTC

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86b1dd9 and 45a699a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/start-server-core/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • packages/start-server-core/package.json
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/start-server-core/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

"@tanstack/start-client-core": "workspace:*",
"@tanstack/start-storage-context": "workspace:*",
"h3": "2.0.0-beta.4",
"h3-v2": "npm:h3@2.0.0-beta.4",
Copy link
Contributor

@coderabbitai coderabbitai bot Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Aliasing h3 as h3-v2 breaks every existing import "h3" call.

Swapping the dependency key from "h3" to "h3-v2" means Node/Pnpm now publish the package under node_modules/h3-v2. All our code still does import {...} from "h3", so resolution will fail at runtime/build. If the goal is to pin to npm: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
In packages/start-server-core/package.json around line 71, the dependency key
was renamed to "h3-v2" which causes all existing imports like import ... from
"h3" to fail; either restore the key to "h3": "npm:h3@2.0.0-beta.4" to pin that
version without changing import paths, or keep "h3-v2" but then update every
import throughout the repo to reference "h3-v2" (or add an aliasing resolution
if using a bundler that supports it); apply the chosen approach consistently and
run a build to verify module resolution.

Copy link
Contributor Author

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

Copy link
Contributor

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 h3 imports to give you a useful analysis.


🏁 Script executed:

#!/bin/bash
# Search for any imports from "h3" in the codebase
echo "=== Searching for imports from 'h3' ==="
rg -nP --type=ts --type=js "import.*from ['\"]h3['\"]" .

echo -e "\n=== Searching for imports from 'h3-v2' ==="
rg -nP --type=ts --type=js "import.*from ['\"]h3-v2['\"]" .

echo -e "\n=== Searching for any other h3 references ==="
rg -nP --type=ts --type=js "from ['\"]h3" .

echo -e "\n=== Checking require statements ==="
rg -nP --type=ts --type=js "require\(['\"]h3['\"]" .

Length of output: 478


Perfect! You're right - the import analysis shows the situation is mostly correct, but let me check the one remaining h3 import:


🏁 Script executed:

#!/bin/bash
# Check the context of the remaining h3 import in the nitro plugin
echo "=== Context around the remaining h3 import ==="
rg -nC5 "from 'h3'" packages/nitro-v2-vite-plugin/src/index.ts

echo -e "\n=== Check if this package has its own h3 dependency ==="
cat packages/nitro-v2-vite-plugin/package.json | jq '.dependencies // {}'

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.ts correctly imports from 'h3-v2'
  • ✅ No remaining broken imports - the one 'h3' reference found is in packages/nitro-v2-vite-plugin/src/index.ts line 100, but that's:
    1. A different package entirely
    2. A virtual entry string that generates code for nitropack's context (which has its own h3 dependency via nitropack)
    3. Not affected by the alias change in start-server-core

Your PR properly aliases h3 to 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!

this should help compatibility with npm and the vite nitro v2 plugin
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5281

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5281

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5281

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5281

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5281

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5281

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5281

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5281

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5281

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5281

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5281

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5281

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5281

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5281

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5281

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5281

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5281

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5281

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5281

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5281

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5281

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5281

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5281

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5281

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5281

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5281

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5281

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5281

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5281

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5281

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5281

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5281

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5281

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5281

commit: c9f393c

@schiller-manuel schiller-manuel merged commit 3a76b3c into main Sep 28, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the h3-package-alias branch September 28, 2025 18:54
@pi0
Copy link
Contributor

pi0 commented Oct 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants