Contributing

Release smoke checks

Build a real Nuxt app against the packed or published module, run it locally or on serverless presets, and verify SSR, payloads and SEO.

The test suites run against the source; these checks install the module the way a user does and test the running app. Run them before a release (packed from the checkout) and after one (from npm), and whenever you touch payload output for serverless or Edge presets. The app is test/deploy-smoke.

Sources

SourceInstallsCatches
gitTarballs packed from the checkoutPackaging problems before publishing: missing files, unresolved workspace: / catalog:, undeclared dependencies
npmnuxt-i18n-micro@latest or a named versionA bad or missing publish, version mismatch between the module and @i18n-micro/*

smoke-pack packs every workspace package with pnpm pack (only pnpm rewrites workspace: and catalog:) and points each tarball's @i18n-micro/* dependencies at its siblings, because the local versions are not on npm yet.

What is checked

smoke-verify --url <base> (HTTP, so it runs against a local server or a deployment):

  • /, /de, /fr, /de/about render their own translations; plurals resolve; no raw keys in the HTML;
  • /_locales/index/de/data.json returns the chunk and is cacheable (not no-store);
  • hreflang alternates with x-default, canonical, og:locale, and <html lang> matching the locale.

smoke-browser --url <base> (Playwright) adds hydration, client navigation between pages and locales with no raw key visible mid-transition, and no uncaught page errors.

Run locally

pnpm run prepack
pnpm -C scripts cli smoke-pack --app test/deploy-smoke
cd test/deploy-smoke
printf 'packages:\n  - .\n' > pnpm-workspace.yaml
pnpm install --no-frozen-lockfile
pnpm exec nuxt build
PORT=3000 node .output/server/index.mjs &
cd ../..
pnpm -C scripts cli smoke-verify --url http://127.0.0.1:3000
pnpm -C scripts cli smoke-browser --url http://127.0.0.1:3000

For a published version, skip smoke-pack and set the dependency to nuxt-i18n-micro@<version> before installing.

Serverless presets locally

The unit tests and the node-server fixtures do not catch SSR that cannot read public/ on a function or Edge preset. preset-smoke packs, installs, builds test/deploy-smoke with a real preset, runs it with the runner that matches the artifact, and calls smoke-verify:

pnpm run prepack                       # once
pnpm run test:presets                  # vercel, cloudflare_pages, netlify
pnpm -C scripts cli preset-smoke --preset vercel                         # one preset
pnpm -C scripts cli preset-smoke --preset vercel --public-assets false   # SSR from serverAssets only
pnpm -C scripts cli preset-smoke --preset vercel --skip-pack --skip-install   # faster reruns

--browser also runs smoke-browser; --skip-build reuses the preset output.

PresetRunner
vercelImports .vercel/output/functions/__fallback.func/index.mjs as a Node listener (as Nitro's own preset tests do; nitropack 2 has no preview for it)
cloudflare_pageswrangler pages dev dist
netlifyImports .netlify/functions-internal/server/main.mjs behind a local HTTP server

vercel dev, emulators and swapping to a Node adapter are not used: they run a different artifact.

CI workflow

.github/workflows/release-smoke.yml runs manually (Actions → release smoke → Run workflow), after a publish has reached npm. Inputs: source (both, git, npm), version (default latest), deploy.

With deploy it deploys the published package to Cloudflare Pages and Vercel, waits for the deployment, and runs smoke-verify and smoke-browser against the live URL. Use dedicated projects: every run replaces the deployment.

NameKindWhere to get it
CLOUDFLARE_PROJECT_NAMEvariableA direct-upload Pages project (Workers & Pages → Create → Pages → Upload assets)
CLOUDFLARE_ACCOUNT_IDsecretThe ID in the dashboard URL, or Account details
CLOUDFLARE_API_TOKENsecretCustom token with one permission: Account · Cloudflare Pages · Edit; no IP filter
VERCEL_ORG_ID, VERCEL_PROJECT_IDsecretpnpm dlx vercel link in test/deploy-smoke writes them to .vercel/project.json (do not commit it)
VERCEL_TOKENsecretA token scoped to the account or team that owns the project

Maintenance commands

Deployment

Contributing