Skip to content

feat: recommend ViteHub Env on Nuxt 5 - #45

Merged
vite-hub[bot] merged 10 commits into
mainfrom
feat/nuxt5-vitehub-env
Nov 1, 2026
Merged

vite-hub[bot] merged 10 commits into
mainfrom
feat/nuxt5-vitehub-env

Conversation

@onmax

@onmax onmax commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Stacked on #40, which is stacked on #39. Merge those first. This PR depends on vite-hub/vitehub#3165, which adds @vite-hub/codemods. Release that package first, because the warning and the guide tell people to run it.

Warning on Nuxt 5

The module now has onInstall and onUpgrade hooks. On Nuxt 5 they print two lines. On Nuxt 4 they print nothing.

[safe-runtime-config] WARN On Nuxt 5, use @vite-hub/env instead: it reads the same .env.example, keeps secrets sealed, and also works in Vite and Nitro.
Migrate with `npx @vite-hub/codemods nuxt-safe-runtime-config`. Guide: https://nuxt-safe-runtime-config.onmax.me/guide/migrate-to-vitehub-env

onUpgrade matters because current users don't install again. They see the warning once, when they upgrade to this release. Validation is unchanged, so the module keeps working on Nuxt 5.

Docs

  • A site-wide banner. A dismissible Nuxt UI UBanner, "On Nuxt 5? Move to @vite-hub/env with one command.", links to the guide. Docus has no banner option, so docs/app/components/app/AppHeader.vue renders the banner and then Docus's own header. The two render side by side with no wrapper element, so the header stays sticky.
  • A new guide, /guide/migrate-to-vitehub-env. It covers why to migrate, how to run the codemod (--dry-run first), and what changes for envSchema and for $schema. The before/after examples come from the codemod's real output in feat(codemods): add @vite-hub/codemods with a nuxt-safe-runtime-config codemod vite-hub/vitehub#3165. It also lists the follow-ups the report gives, and a warning that Public Env is fixed at build time.
  • A README tip, and one line in the introduction, that point to the guide.

Checks

  • test/vitehub-env-recommendation.test.ts: no warning on Nuxt 4. On Nuxt 5, the install and the upgrade hooks each print the two-line message with the codemod command.
  • pnpm typecheck and eslint on the changed files pass.
  • The docs build passes. I checked headless Chromium screenshots of the banner on the landing page and on the guide. /raw/guide/migrate-to-vitehub-env.md returns 200.

🤖 Generated with Claude Code

onmax added 4 commits November 1, 2026 09:42
The shelve option, the Shelve install wizard and the transformEnvVars export are gone.
Use the Shelve CLI to put secrets in the environment before nuxt build or before the
server starts; NUXT_* values are validated as before.
docs/app.config.ts sat outside the Nuxt 4 app directory, so Docus never read
the title, description or favicon. Move it, set the header logo and favicon,
and turn off the AI assistant.
The landing hero renders the FaultyTerminal background tinted Nuxt green and
decrypts the headline once on load. Both stay still with prefers-reduced-motion.
The README banner uses a frame of the same shader.
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nuxt-safe-runtime-config Ready Ready Preview Nov 1, 2026 10:37am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T10:02:02.446571Z e205678 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vite-hub

vite-hub Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-01T10:38:59.252Z 2m 3s
View session Waiting 2026-11-01T10:25:11.252Z 5m 1s
View session Completed 2026-11-01T10:10:06.316Z 3m 19s
View session Completed 2026-11-01T10:05:42.255Z 4m 19s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

View session

All supplied checks passed. Pullfrog’s Node prerequisite finding remains fixed; no repair was needed. git diff --check and content assertions passed. Focused Vitest and ESLint commands were unavailable because host dependency setup rejected inherited minimumReleaseAgeExcludePrune configuration. Codemod publication remains the verified merge blocker.

View session

Pushed 60765cf resolving the main merge conflict and preserving the migration tip. Pullfrog’s prerequisite finding remains fixed. git diff --check and content assertions passed. Vitest and ESLint were unavailable because dependency refresh rejected inherited minimumReleaseAgeExcludePrune configuration. #39 and #40 are merged; the codemod publication prerequisite remains unmet.

Session

Pushed cc06b12 resolving the base-merge conflict while retaining runtime package verification. Focused Vitest passed both tests; workflow ESLint and git diff --check passed. Pullfrog’s prior P2 Node prerequisite finding remains fixed. Host dependency refresh rejected minimumReleaseAgeExcludePrune; pnpm’s automatic install succeeded. Merge prerequisites remain unmet: #39 is open and the codemod package returns npm 404.

Session

Pushed cc06b12 resolving the base-merge conflict while retaining runtime package verification. Focused Vitest passed both tests; workflow ESLint and git diff --check passed. Pullfrog’s prior P2 Node prerequisite finding remains fixed. Host dependency refresh rejected minimumReleaseAgeExcludePrune; pnpm’s automatic install succeeded. Merge prerequisites remain unmet: #39 is open and the codemod package returns npm 404.

Session

Pushed cc06b12 resolving the base-merge conflict while retaining runtime package verification. Focused Vitest passed both tests; workflow ESLint and git diff --check passed. Pullfrog’s prior P2 Node prerequisite finding remains fixed. Host dependency refresh rejected minimumReleaseAgeExcludePrune; pnpm’s automatic install succeeded. Merge prerequisites remain unmet: #39 is open and the codemod package returns npm 404.

View session

Pushed cc06b12 resolving the base-merge conflict while retaining runtime package verification. Focused Vitest passed both tests; workflow ESLint and git diff --check passed. Pullfrog’s prior P2 Node prerequisite finding remains fixed. Host dependency refresh rejected minimumReleaseAgeExcludePrune; pnpm’s automatic install succeeded. Merge prerequisites remain unmet: #39 is open and the codemod package returns npm 404.

View session

Pushed 8f0463d: repaired the stale packing assertion and fixed Pullfrog’s P2 Node prerequisite finding; thread resolved. Focused Vitest (2 tests), ESLint and git diff --check passed. Host dependency setup rejected minimumReleaseAgeExcludePrune; compiled packaging awaits CI. External prerequisites remain: #39 is open and @vite-hub/codemods returns npm 404.

Session

Pass interrupted; current webhook state retained.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The migration guide is missing a runtime prerequisite that can make the documented flow fail for supported Nuxt 5 users.

Reviewed changes reviewed the Nuxt 5 lifecycle recommendation and every new migration-documentation surface in a82f148.

  • Lifecycle warning — adds one-time install and upgrade warnings on Nuxt 5 while remaining silent on Nuxt 4.
  • Migration entry points — adds README, guide-introduction, and site-banner links to the ViteHub Env migration.
  • Migration guide — documents the codemod, generated Env declarations, call-site rewrites, manual follow-ups, and public-value deployment behavior.
  • Tests — covers Nuxt 4 silence and Nuxt 5 install/upgrade warning output; the focused test file passes.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

onmax added 2 commits November 1, 2026 11:00
The hero follows the color mode. In light mode the FaultyTerminal canvas is
inverted and hue-rotated so the grid stays green on white, and blends into the
page background in both modes.
On install or upgrade under Nuxt 5, print two lines that name
npx @vite-hub/codemods nuxt-safe-runtime-config. Add a migration guide, a site
banner and a README tip.
@vite-hub

vite-hub Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

8f0463d repairs the failing pkg packing assertion: dist/runtime/utils/transform.js belonged to the Shelve integration removed in cc52888, so the check now verifies the current Nitro validation plugin. The obsolete source is absent at both the prepared HEAD and exact base c6954d1; base CI itself reports success, so I am not claiming a reproduced base CI failure. Pullfrog’s P2 Node prerequisite finding is fixed by stating Node.js 24.15+ before the first codemod command, matching vite-hub@0.1.0’s published engine requirement. ./node_modules/.bin/vitest run test/vitehub-env-recommendation.test.ts --maxWorkers=1 passed both tests; ./node_modules/.bin/eslint .github/workflows/pkg.yml and git diff --check passed. Source-path checks fail for the old assertion and pass for its replacement; compiled-package validation remains with hosted CI. Host dependency setup recorded a failure rejecting the existing minimumReleaseAgeExcludePrune setting; local executables subsequently became available, allowing these focused checks.

The PR body’s merge prerequisites remain unmet: #39 is still open (#40 is merged), vite-hub/vitehub#3165 is open, and https://registry.npmjs.org/@vite-hub%2fcodemods/latest returns HTTP 404. Merge #39 and publish @vite-hub/codemods before merging this PR, then comment here after those prerequisites are fulfilled.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes reviewed the follow-up commit added since the prior Pullfrog review.

  • Documented the Node.js prerequisite — states the Node.js 24.15+ requirement before users run the codemod or install the migrated ViteHub dependencies, resolving the prior migration-guide concern.
  • Refreshed the packed-runtime smoke check — replaces the stale utils/transform.js assertion with the current nitro/validate-plugin.js artifact; pnpm prepack and all three runtime assertions pass locally.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt-safe-runtime-config@45

commit: 60765cf

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes reviewed the base-merge resolution added since the prior Pullfrog review.

  • Preserved package verification — retained the packed dist/runtime/nitro/validate-plugin.js assertion while accepting the base branch’s removal of the obsolete transform artifact check; pnpm prepack and the resulting runtime assertions pass.
  • Reconciled compatibility documentation — retained the base branch’s Nuxt 4 support wording while preserving this PR’s Nuxt 5 migration recommendation.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot changed the base branch from docs/brand to main November 1, 2026 10:22
@vite-hub
vite-hub Bot merged commit df86b73 into main Nov 1, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 1, 2026
@onmax
onmax deleted the feat/nuxt5-vitehub-env branch November 1, 2026 11:04

This branch was successfully deployed

1 active deployment
Preview — 60765cff Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant