History

What's new in astro-intl

A detailed log of every feature, fix, and breaking change across all versions.

1.0.3

latest
Changed

createIntlMiddleware() now automatically sets locales and defaultLocale in the intl store via __setIntlConfig. Users who use middleware no longer need to pass these options to intl() in astro.config.mjs.

Added

defaultLocale option in IntlMiddlewareOptions type.

1.0.2

initial
Added

Configurable defaultLocale option — no more hardcoded "en" fallback.

Added

runWithLocale() — concurrency-safe request context via AsyncLocalStorage.

Added

Multi-runtime support — auto-detects AsyncLocalStorage (Node.js) with global-variable fallback (Cloudflare Workers, Deno).

Added

IntlConfig type exported for integration configuration.

Changed

Modular architecture — core.ts split into sanitize, interpolation, store, translations modules.

Changed

react.ts now imports shared escapeRegExp from sanitize.ts (removed duplicate).

Fixed

Race condition in SSR — concurrent requests no longer share state.

Fixed

Hardcoded "en" fallback locale now respects defaultLocale config.

1.0.1

initial
Added

Variable interpolation with t("key", { name: "value" }).

Added

t.markup() for HTML in translations with security sanitisation.

Added

t.rich() for React with nested tag support.

Added

defineRequestConfig() for global config registration (next-intl style).

Added

Messages via integration options (messages config).

Added

BCP-47 locale validation.

Added

Prototype-pollution protection in dot-path traversal.

Added

HTML sanitisation (defence-in-depth) in t.markup().

1.0.0

initial
Added

Initial release.

Added

setRequestLocale() for URL-based locale detection.

Added

getLocale() to read current locale.

Added

getTranslations() with namespace support.

Added

getTranslationsReact() for React components.

Added

Type-safety with DotPaths.

Added

Native Astro integration.