Skip to content

gt-react@11.0.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 02:32
· 126 commits to main since this release
858323a

Major Changes

  • #1816 463a8db Thanks @bgub! - Add a config-aware resolveCanonicalLocale helper and remove the public getGTClass helper.

  • #1439 e12fb17 Thanks @ErnestM1234! - Prepare Odysseus major releases for core runtime packages.

  • #1816 463a8db Thanks @bgub! - Remove the deprecated useGTClass hook from public entry points.

  • #1821 40db0c5 Thanks @bgub! - Remove useVersionId from public package entrypoints.

    The getVersionId helper remains available from public function entrypoints and gt-i18n/internal.

  • #1439 8a2f7ee Thanks @ErnestM1234! - Simplify translation option types. Replace deprecated inline and dictionary option aliases with GTTranslationOptions, use interpolation variables for dictionary t() options, and trim higher-level type exports to avoid exposing internal translation option fields.

Patch Changes

  • #1439 37e0080 Thanks @ErnestM1234! - Add default form and accessibility labels to LocaleSelector.

  • #1439 5bfd0a7 Thanks @ErnestM1234! - Preserve browser locale cookie updates when changing locales.

  • #1439 7a9dbe3 Thanks @ErnestM1234! - Clean up stale package metadata and align TanStack Start package entry points.

  • #1815 1212135 Thanks @bgub! - Clean up the @generaltranslation/react-core public API surface.

    • @generaltranslation/react-core: Removed dead dictionary helper exports and source files, stopped exporting JSX serialization internals from /pure, dropped internal singleton/plumbing exports from /pure, removed useShouldTranslate from /hooks, and kept only internalInitializeGTSRA for the server-rendered initializer.
    • gt-react: Aliases internalInitializeGTSRA locally from the RSC entrypoint so the public initializeGT export remains unchanged.
    • gt-next: Replaced imports of removed react-core legacy types with equivalent local types.
  • #1439 bd52e5e Thanks @ErnestM1234! - Allow client i18n cache expiry to default to no expiry while preserving explicit cache expiry configuration.

  • #1439 8d2e84e Thanks @ErnestM1234! - Preserve enableI18n hydration state from server props and request cookies.

  • #1439 04b5064 Thanks @ErnestM1234! - Restore namespace scoping for getTranslations and server useTranslations.

  • #1439 4335432 Thanks @ErnestM1234! - Use the shared runtime environment helper for browser cache dev-mode checks so gt-react typechecks without Vite ambient types.

  • #1828 04c285c Thanks @ErnestM1234! - Fix shipped types for the initializeGT export.

  • #1439 947fe0c Thanks @ErnestM1234! - Fix useVersionId() throwing and useLocaleDirection() requiring a locale argument in the client and server entrypoints.

    useVersionId() now returns the current version id (instead of throwing the react-core "not implemented" error), and useLocaleDirection() once again accepts an optional locale that defaults to the current locale. The shared implementation now lives in @generaltranslation/react-core/hooks, so gt-react and gt-react-native use the same behavior; the RSC entrypoint keeps its stricter signatures.

  • #1439 e026c42 Thanks @ErnestM1234! - Add default form and accessibility labels to RegionSelector.

  • #1820 1f53e42 Thanks @bgub! - Clean up the gt-i18n public API surface by removing dead subpaths, internal exports, and unused types.

  • #1439 b3bb391 Thanks @ErnestM1234! - Store cookie names in I18nConfig so custom cookie names work before the condition store is initialized.

    • gt-i18n: Removed the unused React locale cookie name from the shared GT config type.
    • @generaltranslation/react-core: ReactI18nConfig now accepts localeCookieName, regionCookieName, and enableI18nCookieName, exposes getters that fall back to the default names, and exports the default storage names from the pure entrypoint.
    • gt-next: Imports default cookie names from the React Core pure entrypoint instead of the removed React Core cookie constants subpath.
    • gt-react: The browser condition store now resolves cookie names from I18nConfig instead of hardcoding the defaults, so custom cookie names passed to initializeGT() are honored for both reads and writes.
    • gt-react-native: Native condition storage now resolves its store keys from I18nConfig, matching gt-react behavior.
    • gt-tanstack-start: parseLocale() reads and writes the locale cookie using the configured cookie name instead of the default.
  • #1439 d48604e Thanks @ErnestM1234! - Trigger an odysseus prerelease patch for all publishable packages.

  • #1817 7744c55 Thanks @bgub! - Remove RSC-only render internals from the gt-react react-server entry while keeping the compiler-injected internal translation exports available. The react-server declaration surface now also includes RenderPipeline and RenderPreparedT, matching the other gt-react entries.

  • #1439 97dc7f4 Thanks @ErnestM1234! - Remove default exports from package entrypoints and internal source modules.

    Use named imports for affected public entrypoints, including import { plugin } from 'gt-react-native/plugin'. The gt-next/link entrypoint keeps its default export to match next/link.

  • #1439 85a0c19 Thanks @ErnestM1234! - Remove the deprecated internalInitializeGTSPA export from @generaltranslation/react-core/pure and the downstream gt-react server/types surfaces. Use initializeGTSPA from gt-react for browser SPA initialization.

  • #1439 c5364f9 Thanks @ErnestM1234! - Slim the i18n cache event surface by replacing the generic EventEmitter base class with a single cache-miss listener and removing unused cache helper methods.

  • #1439 2c46baf Thanks @ErnestM1234! - Persist TanStack Start locale resolution through the browser locale cookie.
    Allow React i18n config checks to work across bundled react-core entrypoints.

  • #1439 2ca78ec Thanks @ErnestM1234! - Read Vite runtime credentials during React initialization while keeping dev API keys out of production bundles.

  • #1439 195f009 Thanks @ErnestM1234! - fix: make singleton not-initialized errors consistent and descriptive, and stop error paths from masking the original failure when I18nConfig is also uninitialized

  • Updated dependencies [463a8db, 37e0080, 8870496, 1212135, 04f419d, b72c30b, 72e9e16, 42a440f, fd22c68, bea8233, 8870496, 5736d58, 04b5064, 947fe0c, 5adeede, 328795b, 1f53e42, b3bb391, d48604e, 88f3a2e, e12fb17, 44bc998, 5752fe8, b7d44dc, 9561761, 72c6a85, 3d95277, 97dc7f4, c1e0a0f, 85a0c19, 693288d, 463a8db, e343775, 40db0c5, 8a2f7ee, c5364f9, 2e85ebd, 2c46baf, d5cf2d3, 9e78cf0, 4986567, 795edc8, d863bcf, 11ecf87, 03bae6d, 5d42608, 9804aa4, 338e5e8, 8834c51, 2ca78ec, 195f009]:

    • gt-i18n@1.0.0
    • @generaltranslation/react-core@11.0.0
    • generaltranslation@9.0.0
    • @generaltranslation/format@0.1.2
    • @generaltranslation/supported-locales@2.1.2