gt-next@11.0.0
Major Changes
-
#1816
463a8dbThanks @bgub! - Add a config-awareresolveCanonicalLocalehelper and remove the publicgetGTClasshelper. -
#1439
e12fb17Thanks @ErnestM1234! - Prepare Odysseus major releases for core runtime packages. -
#1816
463a8dbThanks @bgub! - Remove the deprecateduseGTClasshook from public entry points. -
#1821
40db0c5Thanks @bgub! - RemoveuseVersionIdfrom public package entrypoints.The
getVersionIdhelper remains available from public function entrypoints andgt-i18n/internal. -
#1439
8a2f7eeThanks @ErnestM1234! - Simplify translation option types. Replace deprecated inline and dictionary option aliases withGTTranslationOptions, use interpolation variables for dictionaryt()options, and trim higher-level type exports to avoid exposing internal translation option fields.
Patch Changes
-
#1439
8870496Thanks @ErnestM1234! - Use Next.js caching semantics for Cache Components by disabling GT cache expiry and development hot reload runtime translation.Async translation and dictionary lookup boundaries now keep synchronous access to the loaded snapshot, so APIs like
getGTandgetTranslationscan still resolve strings after cache expiry is delegated to Next.js.Global singleton setup now preserves the first initialized instance instead of replacing it on later initialization attempts.
-
#1824
1a483aeThanks @ErnestM1234! - Remove deprecated Next internal packages. -
#1439
7a9dbe3Thanks @ErnestM1234! - Clean up stale package metadata and align TanStack Start package entry points. -
#1815
1212135Thanks @bgub! - Clean up the@generaltranslation/react-corepublic 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, removeduseShouldTranslatefrom/hooks, and kept onlyinternalInitializeGTSRAfor the server-rendered initializer.gt-react: AliasesinternalInitializeGTSRAlocally from the RSC entrypoint so the publicinitializeGTexport remains unchanged.gt-next: Replaced imports of removed react-core legacy types with equivalent local types.
-
#1439
04f419dThanks @ErnestM1234! - Fix source interpolation for default-locale string helpers.
Clarify thattx()does not apply ICU formatting by default. -
#1439
bd52e5eThanks @ErnestM1234! - Allow client i18n cache expiry to default to no expiry while preserving explicit cache expiry configuration. -
#1439
98698deThanks @ErnestM1234! - Escape backslashes in middleware path regex input before dynamic path matching. -
#1659
807dc30Thanks @ErnestM1234! - Add a locale-aware Link component for Next.js applications.Transpile gt-next in Next apps so package runtime config is compiled with app env values. See #1661.
-
#1439
72e9e16Thanks @ErnestM1234! - Split the runtime surface of the GT class (locale management, formatting, runtime translation) into a GTRuntime base class exported from the newgeneraltranslation/runtimeentry point. The SDK runtime (gt-i18n's I18nConfig, gt-next middleware) now constructs GTRuntime, so production browser bundles no longer ship the project/file management API client (enqueueFiles, uploads, downloads, etc.). The GT class extends GTRuntime and keeps its full API for the CLI and other tooling. Also import getLocaleProperties from @generaltranslation/format directly in react-core so client bundles don't reach the full core entry. -
#1439
8870496Thanks @ErnestM1234! - Support dev hot reload lookups for servergetGTstrings.getGTcan now receive compiler-injected message metadata and prefetch missing translations through the runtime cache in development.gt-nextforwards the server request conditions into this path so App Router server strings can participate in hot reload translation updates.Compiler-injected
getGTanduseGTpreload messages now emit the same sugar metadata keys used by runtime lookup options. -
#1439
8d2e84eThanks @ErnestM1234! - Preserve enableI18n hydration state from server props and request cookies. -
#1439
361e158Thanks @ErnestM1234! - Stop forwardinglocale={false}fromgt-next/linkto the underlying Next.js link after localizing the href.This avoids React DOM warnings in newer Next.js versions where the control prop can reach the rendered anchor.
-
#1439
04b5064Thanks @ErnestM1234! - Restore namespace scoping for getTranslations and server useTranslations. -
#1439
ca7218eThanks @ErnestM1234! - Ship a dual ESM/CJS build forgt-nextand addimportexport conditions.Previously
gt-nextwas published as CJS only (noimportcondition), so bundlers resolved the entire gt dependency graph (gt-react,@generaltranslation/react-core,generaltranslation,gt-i18n,@generaltranslation/format) through therequirecondition. That forced CJS variants onto the client, which cannot be tree-shaken — shippinggt-next's own server/error code and unused dependency exports to the browser.gt-nextnow emits unbundled.mjsoutput alongside the existing.jsoutput, and everyexportssubpath exposes animportcondition. Bundlers now resolve the gt graph as ESM, enabling tree-shaking across all gt packages. Measured on a real Next.js app, this cuts gt's total client bundle by ~19% gzip (≈96 kB → ≈78 kB) with no API changes.The ESM build sets
polyfillRequire: falseso rolldown does not inject a package-widecreateRequire-from-node:moduleshim, keeps custom request function imports visible to bundler aliases, and marks theindex.rsc/index.cliententrypoints as having side effects so their top-level initialization is not tree-shaken away. -
#1439
1f10252Thanks @ErnestM1234! - Point thereact-serverexport condition at the RSC-specific declaration file so TypeScript no longer exposes client-only hooks in React Server Components. -
#1439
b3bb391Thanks @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:ReactI18nConfignow acceptslocaleCookieName,regionCookieName, andenableI18nCookieName, exposes getters that fall back to the default names, and exports the default storage names from thepureentrypoint.gt-next: Imports default cookie names from the React Corepureentrypoint instead of the removed React Core cookie constants subpath.gt-react: The browser condition store now resolves cookie names fromI18nConfiginstead of hardcoding the defaults, so custom cookie names passed toinitializeGT()are honored for both reads and writes.gt-react-native: Native condition storage now resolves its store keys fromI18nConfig, matchinggt-reactbehavior.gt-tanstack-start:parseLocale()reads and writes the locale cookie using the configured cookie name instead of the default.
-
#1439
0a6a11cThanks @ErnestM1234! - Keep the locale cookie when the middleware clears the setLocale reset cookie. Deleting it raced with concurrent prefetch responses after a locale switch in production builds, causing client components to fall back to the browser's default locale while server components rendered the selected locale. -
#1439
cecb3e1Thanks @ErnestM1234! - Delegate remote translation loading to the shared i18n cache and only pass custom Next.js translation loaders when configured. -
#1439
d48604eThanks @ErnestM1234! - Trigger an odysseus prerelease patch for all publishable packages. -
#1439
5752fe8Thanks @ErnestM1234! - Organize package entrypoint exports and replace re-export-only imports with direct export declarations. -
#1439
294791aThanks @ErnestM1234! - Add a Pages Router server-side props helper for GT locale and translation snapshots. -
#1439
97dc7f4Thanks @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'. Thegt-next/linkentrypoint keeps its default export to matchnext/link. -
#1439
ee688b2Thanks @ErnestM1234! - Read Next runtime credentials from environment variables and keep them out of serialized config. -
#1439
a8876d4Thanks @ErnestM1234! - Initialize gt-next server entrypoints with a shared server condition store. -
#1822
ce8a665Thanks @bgub! - Clean up thegt-nextAPI surface for the next major prerelease.Removes the deprecated
initGTconfig alias and the redundantgt-next/typessubpath. Moves the hidden dictionary and loader subpaths undergt-next/internal/*, updates the Next config alias plumbing to match, and adjusts CLI setup detection so it no longer treatsinitGTas a valid existing config wrapper. -
#1439
384be28Thanks @ErnestM1234! - Remove 21 unused error/warning builders fromgt-next'serrors/createErrors.ts.The following had no consumers anywhere:
createDictionaryTranslationError,createInvalidDictionaryEntryWarning,createInvalidDictionaryTranslationEntryWarning,createInvalidIcuDictionaryEntryError,createInvalidIcuDictionaryEntryWarning,createMismatchingHashWarning,createNoEntryFoundWarning,createRequiredPrefixError,createStringRenderError,createStringRenderWarning,createStringTranslationError,createTranslationLoadingWarning,dictionaryDisabledError,dictionaryNotFoundWarning,gtProviderUseClientError,missingVariablesError,noInitGTWarn,runtimeTranslationTimeoutWarning,txUseClientError,unresolvedGetLocaleBuildError,usingDefaultsWarning. ~155 LOC of dead error-string code removed. -
#1439
bd02086Thanks @ErnestM1234! - Remove the unusedgetDomainrequest-function plumbing fromgt-next.getDomainwas scaffolded (a throw-onlyinternal/_getDomainstub, agetDomainPathconfig prop, agetDomainentry in the request-function registry, and a_GENERALTRANSLATION_CUSTOM_GET_DOMAIN_ENABLEDbuild env var) but never wired to any runtime consumer — nogetDomain()request helper exists and nothing reads the env var. Removes the stub module, the./internal/_getDomainexport, the config prop/registry entries, and the dead env var.getLocale/getRegionare unchanged. -
#1439
d6ffb70Thanks @ErnestM1234! - Remove the deprecated SSG and experimental-locale-resolution code paths fromgt-next.Drops the long-deprecated, runtime-dead config surface:
experimentalEnableSSG,experimentalLocaleResolution/experimentalLocaleResolutionParam, the static request functions (STATIC_REQUEST_FUNCTIONS/getStatic*and their non-existentinternal/static/*aliases), anddisableSSGWarnings/getStatic*Pathdoc props. Removesplugin/checks/ssgChecks.ts, the experimental branch ofcacheComponentsChecks, the related error/warning builders, and the corresponding build-time env vars (_GENERALTRANSLATION_ENABLE_SSG,_GENERALTRANSLATION_EXPERIMENTAL_LOCALE_RESOLUTION[_PARAM],_GENERALTRANSLATION_STATIC_GET_*_ENABLED) — none of which were read at runtime. The live cacheComponents checks andnoLocalesCouldBeDeterminedWarningare retained. -
#1439
195f009Thanks @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,5bfd0a7,8870496,7a9dbe3,1212135,04f419d,bd52e5e,b72c30b,72e9e16,42a440f,fd22c68,bea8233,8870496,5736d58,8d2e84e,04b5064,4335432,04c285c,947fe0c,5adeede,55c77ea,e026c42,328795b,1f53e42,b3bb391,d48604e,88f3a2e,e12fb17,44bc998,5752fe8,7744c55,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
- gt-react@11.0.0
- generaltranslation@9.0.0
- @generaltranslation/compiler@1.3.25
- @generaltranslation/format@0.1.2
- @generaltranslation/supported-locales@2.1.2