Skip to content

rosetta v0.3.0

Choose a tag to compare

@kaen25 kaen25 released this 28 Aug 08:39
· 25 commits to main since this release

rosetta 0.3.0

rosetta: name the template plugin after inker, and wire it — 0.3.0

The i18n plugin carried the upstream engine's name throughout: the module,
the exported function, its parameter type, and the published export path.
None of that is ours to borrow — the engine is inker.

./plugins/edge  -> ./plugins/inker      (BREAKING: published path)
edgePluginI18n  -> inkerPluginI18n
EdgeLike        -> TemplateEngineLike

Renaming the container token exposed a dead path. The provider resolved a
service named edge; nothing has ever registered one — the provider that
does exist binds inker. So resolveOptional always returned undefined and
the i18n globals never reached a template. The unit test registered the same
absent token, which is why it stayed green.

Resolving inker alone is not enough either: that token is bound to a
renderer, which publishes no globals of its own — the engine it wraps does.
The provider now takes whichever of the two accepts a plugin or publishes
globals, behind type guards rather than a cast.

Covered by a test using the shape the provider actually meets in production
(a renderer exposing the engine), alongside the existing direct-engine ones.

1dc9438

rosetta: narrowing du rounding increment par garde de type

Set.has() ne prouve rien sur le type de la valeur, donc
l'affectation à roundingIncrement perdait le littéral. rosetta
typecheckait seul mais CASSAIT le typecheck de ses consommateurs (erreur
vue depuis inker).

Liste déclarée as const + garde de type, sans cast menteur.

Tests: 191 passés.

150fe3b


Changes since v0.2.0.