@verbaly/next 0.69.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -164,9 +164,9 @@ is what makes the route dynamic. With it, no header is read at all.
164
164
 
165
165
  **Keys are typed.** `getT()` and `useT()` check every key and its params against your catalog, and `getRequestLocale()` returns one of your locales, so `ogLocale[await getRequestLocale()]` needs no cast. The types live in `.verbaly/types.d.ts`, next to the generated modules and never committed; TypeScript skips a dot folder, so Verbaly adds that file to the `include` of your `tsconfig.json`, the way Next adds `.next/types`. On a fresh clone, `next typegen && tsc --noEmit` writes them before it checks them.
166
166
 
167
- That's it. `next dev` extracts your messages live (catalogs and types stay fresh) and says in the terminal what it would otherwise do quietly: a hand edit of a text your code owns, a key written with two texts, a translation that is now older than its source. Each one is said once, and again if it goes away and comes back; a long list stays a few lines, and a catalog saved half-typed pauses live extraction with a one-line reason instead of stopping the server. `next build` blocks on missing translations once it has compiled, so `next typegen`, which loads the same config, never meets the gate, with Yarn PnP too. Both say once when they start if a file outside your `include` writes a `` t`…` ``, which no build translates: in a project without `src/`, add `components/` there. The report prints once, above Next's own failure line. Dev and build show the same words: a text written in the code wins over the catalog in both.
167
+ That's it. `next dev` extracts your messages live (catalogs and types stay fresh) and says in the terminal what it would otherwise do quietly: a hand edit of a text your code owns, a key written with two texts, a translation that is now older than its source. Each one is said once, and again if it goes away and comes back; a long list stays a few lines, and a catalog saved half-typed pauses live extraction with a one-line reason instead of stopping the server. `next build` reports missing, broken and unknown keys once it has compiled and goes on, so `next typegen`, which loads the same config, never meets the report, with Yarn PnP too; `verbaly check` is the gate for CI. Both say once when they start if a file outside your `include` writes a `` t`…` ``, which no build translates: in a project without `src/`, add `components/` there. With `failOnMissing: true` the build stops there instead, and the report prints once, above Next's own failure line. Dev and build show the same words: a text written in the code wins over the catalog in both.
168
168
 
169
- The gate rides on `compiler.runAfterProductionCompile`, and `withVerbaly` keeps any hook of your own there (yours runs first). A wrapper applied **outside** `withVerbaly` that replaces that hook instead of calling the one it got would switch the gate off, so keep `withVerbaly` outermost or compose the hook.
169
+ The report rides on `compiler.runAfterProductionCompile`, and `withVerbaly` keeps any hook of your own there (yours runs first). A wrapper applied **outside** `withVerbaly` that replaces that hook instead of calling the one it got would silence the report, so keep `withVerbaly` outermost or compose the hook.
170
170
 
171
171
  ## 📖 Options
172
172
 
@@ -176,7 +176,7 @@ Second argument of `withVerbaly`: every [`verbaly.config`](https://www.npmjs.com
176
176
  | --------------- | ------------------------------------------------------------------------------------------------------- |
177
177
  | `cookie` | Cookie read/written for the user's choice (default `verbaly-locale`); `false` = `Accept-Language` only. |
178
178
  | `fallback` | Locale when nothing matches (defaults to the source locale). |
179
- | `failOnMissing` | `false` opts out of the build gate. |
179
+ | `failOnMissing` | `true` stops `next build` on whatever fails `verbaly check`; by default the build reports and goes on. |
180
180
 
181
181
  - **Negotiation reads `headers()`/`cookies()`, which makes a route dynamic.** Call `setRequestLocale` with your `[locale]` segment and that read never happens, so the route prerenders. For a fully static site with no server at all, [`verbaly render`](https://www.npmjs.com/package/@verbaly/compiler) mirrors the output per locale.
182
182
  - `getAlternates({ path, baseUrl? })` returns `{ canonical, languages }` for `generateMetadata`, the same hreflang set the static mirror writes. It is empty under `no-prefix` routing, where one URL answers every language.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/next",
3
- "version": "0.69.0",
3
+ "version": "0.70.0",
4
4
  "description": "Next.js integration for Verbaly: App Router/RSC with per-request locale negotiation, Turbopack and webpack support, flash-free hydration.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -64,23 +64,23 @@
64
64
  "access": "public"
65
65
  },
66
66
  "dependencies": {
67
- "@verbaly/compiler": "^0.69.0"
67
+ "@verbaly/compiler": "^0.70.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@verbaly/react": "^0.69.0",
70
+ "@verbaly/react": "^0.70.0",
71
71
  "next": "^15.0.0 || ^16.0.0",
72
72
  "react": "^18.0.0 || ^19.0.0",
73
- "verbaly": "^0.69.0"
73
+ "verbaly": "^0.70.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/react": "^19.3.0",
77
77
  "@types/react-dom": "^19.3.0",
78
- "@verbaly/react": "^0.69.0",
78
+ "@verbaly/react": "^0.70.0",
79
79
  "happy-dom": "^20.14.5",
80
80
  "next": "^16.4.0",
81
81
  "react": "^19.3.0",
82
82
  "react-dom": "^19.3.0",
83
- "verbaly": "^0.69.0"
83
+ "verbaly": "^0.70.0"
84
84
  },
85
85
  "scripts": {
86
86
  "build": "tsdown",