Repository navigation
Releases
v0.9.3
Patch Changes
-
Security, correctness, and stability fixes:
- Validate fallback locale candidates as BCP-47 in
dialexjs, guardlookupLocalewithObject.hasOwn, HTML-escape SvelteKitLANG_PLACEHOLDER, prevent unhandled rejections on failed lazy dictionary loads in Vue/Svelte/Solid, harden ICUnull/empty-string/currency handling, and migrate Express/Fastify/Hono/Koa/NestJS adapters to shared request locale resolution. - Run
dialex_generatein static mode, confine MCP file/config/output paths to the workspace root, and reject empty key paths insetString()/dialex_set_key. - Fix async
refresh()/syncWatchers()race conditions in@dialexjs/language-server(and the VS Code extension), CSV formula escaping / mid-cell quote parsing / check pluralization / cache pruning in@dialexjs/cli, and theoxlintdiagnostic snippet test in@dialexjs/eslint-plugin.
- Validate fallback locale candidates as BCP-47 in
v0.9.2
Patch Changes
- a9cbdbe:
t()keeps the compiled message with its path, so a repeated call with values skips the lookup by message text. Plural and select messages are about 10% faster in a single-locale app (measured old against new in one process); a server that renders several locales in turn is unchanged.
v0.9.1
v0.7.2
Patch Changes
- 0800399: Editor features follow a dictionary held in a variable: after
const s = useDictionary("showcase"), hover, go to definition and completion work ons.nav.featuresands., in the language server and the VS Code extension.
v0.7.1
Patch Changes
- b883a78: The VS Code extension re-reads only the files that changed.
analyzeProjecttakes an optionalcache(createAnalysisCache()) that remembers parsed dictionaries and scanned source files by modification time, and the extension keeps the project layout and.gitignorerules until files are added or removed. On a synthetic project with 10,000 source files a refresh went from about 950 ms to about 240 ms. - 8ee86f2: New package
@dialexjs/language-server: a language server (LSP) for Dialex translations, so editors other than VS Code get diagnostics, hover, go to definition, completion, quick fixes and automaticdialex.generated.tsupdates. The editor-independent features (hover, definition, completion, quick fixes, project discovery) moved into it and are shared with the VS Code extension.
v0.7.0
Minor Changes
-
5d7f143: The scanners (
dx generate,dx check, the watcher, the analysis API and the VS Code extension) now respect.gitignore: files in ignored folders are no longer picked up as dictionaries or sources. Monorepo packages inherit the repository's.gitignore, and nested.gitignorefiles apply to their folder.New config option
exclude(globs relative to the project) for anything else. All scanners now share one list of built-in ignores (node_modules,dist,.next,dialex.locales, and for sources.nuxt,.output,.svelte-kit,.astro,coverage,*.d.ts, generated and config files), so they no longer disagree.
Patch Changes
- 3909e30: Fix the VS Code extension: the
.vsixshipped without thejitiand runtime chunks thatextension.cjsloads, so the extension failed to activate and its commands were "not found". Existing installs need the new.vsixfrom the GitHub Release.
v0.6.0
Minor Changes
-
725a0c0: The server adapters (Express, Fastify, Hono, Koa, Elysia, h3, Astro, SvelteKit, NestJS, Fetch API, Angular) accept the generated
config, so{ ...dialex }fromdialex.generated.tsis all they need:defaultLocale,localesandfallbacksno longer have to be repeated by hand. Explicit options still win.Express, Hono, Koa, Elysia, h3 and Astro also export
dialexExpress,dialexHono,dialexKoa,dialexElysia,dialexH3anddialexAstro, so the adapter and the generateddialexobject do not share a name.dialexkeeps working. -
39eca0b:
dialexjsno longer depends onfast-globandunconfig(about 2.9 MB of installed size, mostlyjiti). The project scanner moved into@dialexjs/cli, which already did all the scanning.Breaking: the
dialexjs/scannerentry point is gone, and adapters no longer scan the project at startup when nodictionariesare passed. Pass the generated registry ({ ...dialex }fromdialex.generated.ts); an adapter without it only finds dictionaries already registered throughdefineDictionary.
v0.5.2
Patch Changes
- d5d3669: Add
localeFromPathandisLocaletodialexjs/routing.
v0.5.1
v0.5.0
Minor Changes
-
4050d36:
lazy: "locale"splits dictionaries per locale, so a visitor only downloads the language they read.dx generatewrites one module per dictionary and locale into adialex.locales/folder next todialex.generated.ts, andloaderspoints at them. In a real Vite build the main bundle holds neither language, and a Turkish page fetched only the.trchunks until the visitor switched to English, which then fetched the.enones.- Switching language downloads the new locale on demand. In React the current language stays on screen until the new one has arrived (the update runs in a transition); in Vue the dictionary is empty until it loads, and server-side rendering waits for it.
preloadDictionaries(dialex, { locale: "tr" }, "pricing")fetches a locale ahead of time.- A dictionary is split only when each locale is self-contained. If a locale uses something defined elsewhere in its file (an import or a helper), the dictionary is loaded whole and
dx generatesays why. dx checkreports missing or out-of-date per-locale modules, and--fixrewrites them.lazy: trueis unchanged.dx generateno longer treats its own output (dialex.generated.ts,*.d.ts) as dictionaries whenincludeis broad, such assrc/**/*.ts.
-
b39c7f6: Stale translations are detected.
dx translatenow writesdialex.lock.json, which records a short hash of the source text behind each translation, so a later edit of the source no longer leaves the other languages silently out of date.dx checkwarns about each translation whose source text changed since it was recorded (stale-translation), and--fail-on-stalemakes it an error. The VS Code extension shows the same warning. Translations without a record (hand-written ones) are never reported.dx translate --staletranslates the out-of-date strings again; only these may replace an existing translation.dx lockrecords the translations you already have, so existing projects can adopt the lock file (--allalso accepts out-of-date ones).dx importrecords what it imports once a lock file exists.- MCP:
dialex_missingalso listsstaletranslations.
-
5235a9f:
t()checks ICU arguments.dx generatewritesMessageArgumentsintodialex-env.d.ts(read from each dictionary's default locale), sot("cart.items", { count })fails to compile whencountis missing, misspelled or not a number.plural,selectordinalandnumberarenumber,dateandtimeareDate | number,selectis the union of its options, and a plain{name}takes a string, number, boolean orDate.A message that has ICU arguments can no longer be called without values (
t("cart.owner")was allowed and returned the raw string). Pass the values, or remove the braces if they were literal.Adapters that scan the project at runtime (no
dictionariespassed) no longer writedialex-env.d.ts; it was a second writer that could undo the generated file. Rundx generate.