Repository navigation
fix(plugin-i18next): restore T/FT/resolveKey/resolveUserKey shims and release the v5 peer range - #116
Conversation
… release v5 peer range - export `T`, `FT`, `resolveKey`, `resolveUserKey`, `TypedT` and `TypedFT` again as deprecated shims with http-framework-i18n's signatures, so migrated projects no longer fail at load time (#114) - add a changeset for the `@wolfstar/http-framework` `^3.1.0 || ^5.0.0` peer range, so the next stable release carries it (#115) Closes #114 Closes #115 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DE7qshA3oa1qYHFEhago9F
◈ PR Lens
Architecture 1 component touched across 3 lanes. Play the interactive walkthrough Data flow
Follow each request, response and payload View
Tip Add 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Restores previously removed exports for backwards compatibility during migration and documents an already-shipped peer-dependency widening.
packages/plugin-i18next/src/lib/compat.ts(new): re-exportsT,FT,TypedT,TypedFT,resolveKey,resolveUserKeyas deprecated shims, delegating togetSupportedLanguageT/getSupportedUserLanguageT.src/index.ts: wires the new module into the package barrel viaexport * from "./lib/compat".tests/compat.test.ts(new): 5 tests covering the barrel export surface, key branding, andresolveKey/resolveUserKeyresolution (including a missing-key default-value case) against fixture locale files.README.md: updates the migration guide to describe these helpers as deprecated-but-present rather than fully removed.- Two changesets: a
minorbump for the restored exports (#114) and apatchdocumenting the@wolfstar/http-framework": "^3.1.0 || ^5.0.0"peer range (#115).
I ran the new test suite (npx vitest run packages/plugin-i18next/tests/compat.test.ts, 5/5 pass) and tsc --noEmit on the package (clean). I also traced git history: the shim signatures and JSDoc in compat.ts are a byte-for-byte restoration of the implementation removed in 33d1278 (#57), not a blind reimplementation, so migrated callers written against the pre-#57 API will actually work unchanged. There's no export-name collision with ./lib/functions/./lib/types. The peer-dependency changeset documents a range that was already present in package.json since the package's creation and isn't duplicated by any existing changeset, so it's a legitimate retroactive addition rather than redundant.
Claude Sonnet | 𝕏

🔗 Linked issue
Resolves #114
Resolves #115
🧭 Context
@wolfstar/http-framework-i18nmigration guide saysT,FT,resolveKeyandresolveUserKey"keep the same names and signatures".@wolfstar/plugin-i18nextexports none of them, so a migrated project fails at load time withdoes not provide an export named 'T'. When the error happens inside a command piece, Sapphire drops the command and the endpoint answers501 Unknown command name.main, the@wolfstar/http-frameworkpeer range is already^3.1.0 || ^5.0.0, but npmlatest(2.0.4) still declares^3.1.0. Every v5 project gets an unmet peer warning, and installs fail understrict-peer-dependencies. No pending changeset records the peer widening, so it has no entry in the upcoming release.📚 Description
plugin-i18next: T, FT, resolveKey and resolveUserKey are not exported, contrary to the migration guide #114: the new
src/lib/compat.tsrestoresT,FT,resolveKeyandresolveUserKey, plus theTypedTandTypedFTtypes. Their signatures match@wolfstar/[email protected], the last release that still shipped these helpers, and they are all re-exported from the package index.@deprecated, and its doc comment points to the replacement.TandFTreturn the key unchanged.resolveKeyandresolveUserKeydelegate togetSupportedLanguageTandgetSupportedUserLanguageT.Target, not only anInteraction, so all old call sites still type-check.The branded-key API stays deprecated in favour of typed plain keys. The shims only make the migration a module-specifier rename again, as the guide promises. The README migration section now says this.
plugin-i18next: latest release does not accept @wolfstar/http-framework v5 as a peer #115: adds a patch changeset for the peer range, so the next release carries it with a changelog entry. It reaches npm
latestonce thechore: update changelog and releasePR opened bychangesets/actionis merged.Key changes
import { T } from '@wolfstar/plugin-i18next'SyntaxErrorat load time@deprecatedresolveKey(target, key, options)getSupportedLanguageT(target, key, options)resolveUserKey(target, key, options)getSupportedUserLanguageT(target, key, options)@wolfstar/http-frameworkpeer on npmlatest^3.1.0^3.1.0 || ^5.0.0in the next releaseTests: the new
packages/plugin-i18next/tests/compat.test.tschecks that the four helpers are exported. It also checks thatT/FTreturn the key unchanged, thatresolveKey/resolveUserKeyresolve the guild's and the user's language (including interpolation), and that the positionaldefaultValueworks.Changesets:
@wolfstar/plugin-i18next, minor: the restored exports.@wolfstar/plugin-i18next, patch: the v5 peer range.Type of Change
Pre-flight Checklist
pnpm lint,pnpm build,pnpm typecheckandpnpm testpass: 427 tests)packages/plugin-i18next/README.mdmigration sections)pnpm changeset(orpnpm changeset add --emptyif no release is needed). See .changeset/README.md.Note
@wolfstar/plugin-api,@wolfstar/plugin-loggerand@wolfstar/plugin-subcommands-advancedhave the same release gap as #115: their v5 peer range is onmainbut has no pending changeset. They are left out of this PR to keep it scoped toplugin-i18next.🤖 Generated with Claude Code
https://claude.ai/code/session_01DE7qshA3oa1qYHFEhago9F