feat: add a built-output smoke test command (`nuxt preview --smoke`)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- bun, node.js, typescript
調査の方向性
Read the existing nuxt preview command and the described ~550-line Bun smoke script to map how the built server is started and checked. Then trace how the CLI resolves the .output entry and handles environment and signals across runtimes. Done means a smoke command checks HTTP expectations and shutdown, exits nonzero on failure, and leaves no server process running.
索引モデルが issue の本文から書いたものです。
説明
nuxt preview starts .output/server/index.mjs, but it does not verify that the built output:
- boots with the production environment,
- serves the shell and all required assets/chunks,
- starts with the intended runtime (Bun or Node),
- runs Nitro
closehooks and exits cleanly onSIGTERM/SIGINT.
nuxt build can pass while the deploy fails at runtime: a missing secret, a wrong database path, a missing asset, a preset regression (for example the Bun preset skipping close hooks), or a shutdown that hangs. We currently maintain a ~550-line smoke script for this.
What our script does:
- reserves a free port, creates temporary SQLite databases, and applies migrations;
- builds a minimal environment instead of inheriting the developer
.env; - spawns
.output/server/index.mjswith Bun; - waits for HTTP 200 and a known shell marker, and scans captured logs for forbidden content;
- sends
SIGTERM, asserts exit within 15 seconds and clean shutdown; on Windows it records that Bun'sSIGTERMis termination-only; - is the last step of
check -> build -> built-output Playwright -> smoke.
Proposal: nuxt preview --smoke (or nuxt build --smoke) with:
--url/--expectfor a path plus expected status and optional body marker;--timeoutand--signal;--env-fileor--envfor a minimal production environment;- an assertion that the process exits after the signal, optionally checking a close-hook marker;
- a non-zero exit on failure, and no server process left behind;
- support for the current runtime and
.outputlayout without hard-coding Nitro internals.
What exists today:
nuxt previewstarts the server but makes no assertions.@nuxt/test-utilsis excellent for tests that call the server, but it does not own the built process lifecycle or shutdown assertions.- Nitro close hooks are usually tested manually or with a custom script.
This could be a module, but a CLI command is the right home because it must know the output entry, environment loading and signal semantics. Happy to contribute the command or a shared helper. Our script is Bun-specific today; cross-platform signal handling is the main design work.
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
- 主要言語
- TypeScript
- スター
- 402
- フォーク
- 125
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 37
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
dev: false "reachable from the network" warning when `devServer.host` is a `*.localhost` subdomain再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
[Bug]: Search input loses focus while typing on the Inventory, Reservations and Locations lists (view_configurations enabled)対応中かも @medusa-os-bot が今日担当しました。 オープンstatus: needs triaging type: bug version: 2.0
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
medusajs/medusa#17886 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
marimo-team/marimo#11949 ·
メンテナーはふだん 1 日以内に返信
-
bug server-time v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/servers#5559 ·
メンテナーはふだん 1 日以内に返信
-
D1 Time Travel restore help advertises 30 days without a plan qualifier対応中かも @akhil9tiet が今日担当しました。 オープンbug package:wrangler product:d1
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/workers-sdk#17000 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug severity:medium triage:confirmed triage:reproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Cotal-AI/Cotal#7440 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信