🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@i18n-micro/types

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@i18n-micro/types - npm Package Compare versions

Comparing version
1.2.8
to
1.2.10
+28
-12
dist/index.d.cts

@@ -165,6 +165,6 @@ /** BCP-47 locale code string (e.g. `'en'`, `'de-DE'`, `'zh-Hans'`). */

* Base URL for SEO meta tags (canonical, og:url, hreflang).
* - `undefined` — dynamically resolved from the current request URL
* - A concrete URL string (e.g. `'https://example.com'`) — used as-is (highest priority).
* - `undefined` — falls back to `site.url` from `nuxt-site-config` when that module is
* present, otherwise the current request origin
* (`useRequestURL().origin` on server, `window.location.origin` on client).
* Best for multi-domain deployments.
* - A concrete URL string (e.g. `'https://example.com'`) — used as-is.
* @default undefined

@@ -188,2 +188,9 @@ */

/**
* Also emit a bare-language `hreflang` derived from each locale's `iso`
* (e.g. `es-ES` → also `es`). The first regional locale in `locales` claims
* the bare tag for that language. Routing `code` is never used — only `iso || code`.
* @default false
*/
hreflangBaseLanguage?: boolean;
/**
* Register the `defineI18nRoute()` macro plugin, enabling per-page `defineI18nRoute()` calls.

@@ -272,5 +279,10 @@ * @default true

/**
* URL path on which automatic language detection and redirect occur.
* - `'/'` — detect only on the root path.
* - `'*'` — detect and redirect on every path (including locale-prefixed ones).
* Where cookie / Accept-Language preference redirects may run (when `redirects` is enabled).
* - `'/'` — only `/` (deep links in the default locale stay reachable; default)
* - `'no_prefix'` — only paths without a locale prefix
* - `'*'` — every path, including rewriting an explicit locale prefix
* (e.g. `/fr/about` → `/de/about` when the cookie prefers `de`)
* - any other string — exact path match (e.g. `'/welcome'`)
*
* Prefixed strategy cleanup (e.g. `/en` → `/` under `prefix_except_default`) is not gated.
* @default '/'

@@ -300,9 +312,13 @@ */

/**
* Custom pluralization function or a path to a file exporting one.
* When a string path is provided, the file is imported at build time.
* The function receives `(key, count, params, locale, getter)` and should return
* the correct plural form as a string, or `null` to fall back to the built-in logic.
* @default built-in pluralization (singular/plural by count)
* Custom pluralization function.
* Receives `(key, count, params, locale, getter)` and should return the selected
* plural form as a string, or `null`/`undefined` to fall back to the built-in
* `defaultPlural` logic (so you can override only some locales).
*
* For the Nuxt module the function is serialized with `.toString()` into
* `.nuxt/i18n.plural.mjs` — it must be self-contained (no imports / outer scope).
* A file path string is **not** supported.
* @default built-in pluralization (form index by count)
*/
plural?: string | PluralFunc;
plural?: PluralFunc;
/**

@@ -309,0 +325,0 @@ * Disable per-page translation files.

@@ -165,6 +165,6 @@ /** BCP-47 locale code string (e.g. `'en'`, `'de-DE'`, `'zh-Hans'`). */

* Base URL for SEO meta tags (canonical, og:url, hreflang).
* - `undefined` — dynamically resolved from the current request URL
* - A concrete URL string (e.g. `'https://example.com'`) — used as-is (highest priority).
* - `undefined` — falls back to `site.url` from `nuxt-site-config` when that module is
* present, otherwise the current request origin
* (`useRequestURL().origin` on server, `window.location.origin` on client).
* Best for multi-domain deployments.
* - A concrete URL string (e.g. `'https://example.com'`) — used as-is.
* @default undefined

@@ -188,2 +188,9 @@ */

/**
* Also emit a bare-language `hreflang` derived from each locale's `iso`
* (e.g. `es-ES` → also `es`). The first regional locale in `locales` claims
* the bare tag for that language. Routing `code` is never used — only `iso || code`.
* @default false
*/
hreflangBaseLanguage?: boolean;
/**
* Register the `defineI18nRoute()` macro plugin, enabling per-page `defineI18nRoute()` calls.

@@ -272,5 +279,10 @@ * @default true

/**
* URL path on which automatic language detection and redirect occur.
* - `'/'` — detect only on the root path.
* - `'*'` — detect and redirect on every path (including locale-prefixed ones).
* Where cookie / Accept-Language preference redirects may run (when `redirects` is enabled).
* - `'/'` — only `/` (deep links in the default locale stay reachable; default)
* - `'no_prefix'` — only paths without a locale prefix
* - `'*'` — every path, including rewriting an explicit locale prefix
* (e.g. `/fr/about` → `/de/about` when the cookie prefers `de`)
* - any other string — exact path match (e.g. `'/welcome'`)
*
* Prefixed strategy cleanup (e.g. `/en` → `/` under `prefix_except_default`) is not gated.
* @default '/'

@@ -300,9 +312,13 @@ */

/**
* Custom pluralization function or a path to a file exporting one.
* When a string path is provided, the file is imported at build time.
* The function receives `(key, count, params, locale, getter)` and should return
* the correct plural form as a string, or `null` to fall back to the built-in logic.
* @default built-in pluralization (singular/plural by count)
* Custom pluralization function.
* Receives `(key, count, params, locale, getter)` and should return the selected
* plural form as a string, or `null`/`undefined` to fall back to the built-in
* `defaultPlural` logic (so you can override only some locales).
*
* For the Nuxt module the function is serialized with `.toString()` into
* `.nuxt/i18n.plural.mjs` — it must be self-contained (no imports / outer scope).
* A file path string is **not** supported.
* @default built-in pluralization (form index by count)
*/
plural?: string | PluralFunc;
plural?: PluralFunc;
/**

@@ -309,0 +325,0 @@ * Disable per-page translation files.

{
"name": "@i18n-micro/types",
"version": "1.2.8",
"version": "1.2.10",
"description": "TypeScript definitions for the Nuxt I18n Micro ecosystem.",

@@ -5,0 +5,0 @@ "keywords": [