Improve type generation of the i18n plugin#16139
Merged
rak-phillip merged 1 commit intorancher:masterfrom Dec 10, 2025
Merged
Conversation
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
f3138dc to
6678926
Compare
Member
|
We need to bind the use of dependencies better here. |
cnotv
approved these changes
Dec 10, 2025
Member
cnotv
left a comment
There was a problem hiding this comment.
I am not entirely sure why do we need a script to define a .d.ts, but I guess it's ok given the existing pattern.
Could we take the change to bump the version? If you want to do not mixup stuff it's also ok another PR.
Note: that composable needs a test.
Member
|
Can confirm issue solved, thanks 🥂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This updates the Rancher Shell type generation to include the i18n plugin.
Occurred changes and/or fixed issues
stringFor()with a dostring to include typest()function ofuseI18nTechnical notes summary
Kubewarden UI will fail with the following error when updating to the latest versions of
@rancher/shell:This issue appears to be isolated to Kubewarden, but the root cause can be linked to kubewarden depending on later versions of typescript than shell and other extensions, so this failure could be linked to better type checking overall.
There's also a risk that we will encounter these issues for other extensions in the future as we update dependencies in shell.
After updating the types for the i18n plugin, we received a new typescript warning:
I added some guards to ensure that the store is available before invoking
stringFor().Areas or cases that should be tested
Publish an updated versions of shell to a local registry or link the package. Kubewarden should no longer show type errors.
We will want to test with a few other extensions, but that should be covered by CI.
Areas which could experience regressions
This adds better type support for the i18n plugin. Other extensions might rely on ill defined types and will need to updated accordingly to support the change.
Screenshot/Video
NA
Checklist
Admin,Standard UserandUser Base