@xndrjs/i18n 0.3.3-alpha.0 → 0.3.3

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 +7 -7
  2. package/package.json +1 -6
package/README.md CHANGED
@@ -21,14 +21,14 @@ The core idea: your ICU strings live in local JSON files that act as **type-safe
21
21
  ### Install
22
22
 
23
23
  ```bash
24
- npm install @xndrjs/i18n tsx
25
- # optional external dictionary validation
26
- npm install zod
24
+ npm install @xndrjs/i18n zod
25
+ npm install -D tsx
27
26
  ```
28
27
 
29
- `tsx` is a **peer dependency** required by `xndrjs-i18n-codegen`: the CLI runs the TypeScript codegen script directly (no precompiled JS bundle). Add it to your app or monorepo root.
28
+ `tsx` and `zod` are **peer dependencies** of `@xndrjs/i18n`:
30
29
 
31
- `zod` is optional only needed when you use `dictionarySchemaOutput` and the generated `validateExternalDictionary()` helpers.
30
+ - **`tsx`**required by `xndrjs-i18n-codegen` and `xndrjs-i18n-audit` (CLIs run TypeScript directly). Install as a **devDependency** — only needed at build/CI time.
31
+ - **`zod`** — required by codegen/audit config validation (`i18n.codegen.json`) and by `@xndrjs/i18n/validation` when using `dictionarySchemaOutput` and `validateExternalDictionary()`. Use a **devDependency** if validation runs only at build time; a regular **dependency** if you validate CMS payloads in production.
32
32
 
33
33
  ### Quick setup (single file)
34
34
 
@@ -533,7 +533,7 @@ Enable validation by adding `dictionarySchemaOutput` to `i18n/i18n.codegen.json`
533
533
  }
534
534
  ```
535
535
 
536
- Add `zod` as a dependency in the consumer app (optional peer of `@xndrjs/i18n`).
536
+ Add `zod` as a dependency in the consumer app (required peer of `@xndrjs/i18n`).
537
537
 
538
538
  Codegen emits `DICTIONARY_SPEC` and `validateExternalDictionary()`. Validation runs in two phases:
539
539
 
@@ -641,5 +641,5 @@ pnpm run demo:multi # tsx multi/src/index.ts
641
641
  - **TypeScript 6** (`strict`, `resolveJsonModule`, `moduleResolution: "bundler"`)
642
642
  - **[intl-messageformat](https://www.npmjs.com/package/intl-messageformat)** — runtime ICU formatting
643
643
  - **[@formatjs/icu-messageformat-parser](https://www.npmjs.com/package/@formatjs/icu-messageformat-parser)** — build-time AST parsing
644
- - **[zod](https://www.npmjs.com/package/zod)** — optional peer for external dictionary validation
644
+ - **[zod](https://www.npmjs.com/package/zod)** — peer dependency (config validation, external dictionary validation)
645
645
  - **[tsx](https://www.npmjs.com/package/tsx)** — runs TypeScript scripts directly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xndrjs/i18n",
3
- "version": "0.3.3-alpha.0",
3
+ "version": "0.3.3",
4
4
  "description": "Compiler-first, type-safe ICU MessageFormat i18n with runtime dictionary override from external sources.",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -45,11 +45,6 @@
45
45
  "tsx": ">=4",
46
46
  "zod": "^4.0.0"
47
47
  },
48
- "peerDependenciesMeta": {
49
- "zod": {
50
- "optional": true
51
- }
52
- },
53
48
  "devDependencies": {
54
49
  "tsup": "^8.5.1",
55
50
  "tsx": "^4.22.4",