rnx-kit
rnx-kit copied to clipboard
[SUGGESTION] Can we also include @types/xyz dependencies in align-deps
What happened?
I have seen quite often that people who use rnx-kit/align-deps, update their dependencies properly as align-deps does it for them. But they often forget to update the type dependencies. For example, with React: 18.x.x we should use @types/React: 18.x.x. with ReactNative: 0.71.x, we do not need types/react-native as types are already included. There could be merit in configuring align-deps to factor in these dependencies as well.
Affected Package
@rnx-kit/align-deps
Version
2.2.0
Which platforms are you seeing this issue on?
- [ ] Android
- [ ] iOS
- [ ] macOS
- [ ] Windows
System Information
NA
Steps to Reproduce
NA
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
submit a PR?
@kelset sure I can submit a PR but before I did that i wanted to confirm if you folks also think that this will be a meaningful addition.
I think it makes sense to add it. My only concern is that we should not make the react
capability take a dependency on it. It's not a given that people use TypeScript.
Yeah. Makes sense. We can maybe add "types" as a capability. If "types" is listed as a capability, the tool will check/include typings for required packages. What do you think?
Yeah. Makes sense. We can maybe add "types" as a capability. If "types" is listed as a capability, the tool will check/include typings for required packages. What do you think?
I think that will require a lot more work and no longer makes the core engine generic. If we just add a types/react
capability, the types package will be checked when you run in "vigilant" mode. I find that most people do this anyway to catch packages that they forgot to add.