vite-bundled-i18n 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -236,7 +236,7 @@ async function resolvePage(
236
236
  }
237
237
  ```
238
238
 
239
- Calling `loadScope` is safe from concurrent paths. The runtime deduplicates by `(locale, scope)` — 100 parallel calls fire exactly one fetch, share the same promise, and resolve together. On fetch failure the in-flight entry clears, so a retry starts fresh. Side effects (cache writes, devbar state, dependent scope flags) run once per logical load, not once per caller.
239
+ Calling `loadScope` is safe from concurrent paths. The runtime deduplicates by `(locale, scope)` — 100 parallel calls fire exactly one fetch and share the same promise. On fetch failure, that promise rejects and the in-flight entry clears, so a retry starts fresh. Side effects (cache writes, devbar state, dependent scope flags) run once per logical load, not once per caller.
240
240
 
241
241
  **Page identifiers.** The default strips `src/pages/` and common `.tsx` / `.page.tsx` suffixes:
242
242
 
@@ -683,7 +683,9 @@ app.use(createI18nTestPlugin(i18n))
683
683
 
684
684
  ## Releases
685
685
 
686
- Current release: **v0.7.0** — three loosely-related shipments:
686
+ Current release: **v0.7.1** — bugfix release. Dev-mode `loadScope` no longer dedupes by inferred namespace (was unsound under `bundling.dev.leanBundles: true` — the v0.6.1+ default). When two scopes share a namespace and each receives a different tree-shaken slice from the dev plugin, the second scope's load now correctly fetches and deep-merges instead of short-circuiting on namespace presence. Same fix applied to `isScopeLoaded`. Production unaffected (per-scope-id URLs avoid the collision by construction).
687
+
688
+ Built on **v0.7.0** — three loosely-related shipments:
687
689
 
688
690
  - **Build-stamp + staleness detection.** Every successful build writes `.i18n/build-stamp.json` recording the cache mtime it observed; the next build compares against that anchor (not against the stamp file's own mtime, so multi-minute builds and dev sessions no longer look stale). Cache schema bumped v1 → v2 (one-time auto-invalidation on upgrade). New CLI commands `clean` and `rebuild` formalize the recovery path; `--extra-path` is constrained to paths inside `rootDir` unless `--allow-outside-root` is set.
689
691
  - **ESLint plugin.** `vite-bundled-i18n/eslint` ships 5 rules (`no-t-dynamic`, `no-non-literal-t-arg`, `no-renamed-t`, `no-member-access-t`, `t-arg-must-exist-in-types`) with both `recommended` (warn) and `strict` (error + `t-arg-must-exist-in-types` enabled) presets. Both flat-config (ESLint 9+) and legacy (ESLint 8) shapes. Bracket-access variants (`t['dynamic']`, `props['t']`) are covered alongside dot access.
@@ -1588,7 +1588,7 @@ function resolveCacheConfig(input, context) {
1588
1588
  * back to a development placeholder during tests and direct imports before
1589
1589
  * the build step runs.
1590
1590
  */
1591
- var PLUGIN_VERSION = "0.7.0";
1591
+ var PLUGIN_VERSION = "0.7.2";
1592
1592
  //#endregion
1593
1593
  //#region src/extractor/scope-map.ts
1594
1594
  var COMPOSITE_PAGE_SUFFIXES = [
@@ -2269,4 +2269,4 @@ function formatDuration(ms) {
2269
2269
  //#endregion
2270
2270
  export { keyMatchesPattern as A, writeRuntimeConst as C, pruneNamespace as D, generateBundles as E, resolveDictionaryOwnership as M, buildScopePlans as O, runtimePathFromTypesPath as S, flattenKeys as T, extractKeys as _, runStrictExtraction as a, generateReports as b, applyDynamicKeys as c, resolveCacheConfig as d, CACHE_FILE_NAME as f, walkAll as g, resolveImport as h, assertNoStrictExtractionErrors as i, normalizeDictionaries as j, inferScopeNamespace as k, buildScopeMap as l, createExtractionCache as m, detectStaleness as n, writeStrictExtractionReport as o, computeConfigHash as p, writeBuildStamp as r, compileAll as s, computeAnalysisFingerprint as t, PLUGIN_VERSION as u, flattenLocaleKeys as v, writeTypes as w, generateTypes as x, generateDictionaryOwnershipReport as y };
2271
2271
 
2272
- //# sourceMappingURL=build-stamp-CwD2KxEn.js.map
2272
+ //# sourceMappingURL=build-stamp-BvP03CCo.js.map