Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Can we also include @types/xyz dependencies in align-deps #2398

Open
1 of 5 tasks
SparshaSaha opened this issue May 3, 2023 · 5 comments
Open
1 of 5 tasks
Labels
enhancement New feature or request feature: align-deps This is related to align-deps

Comments

@SparshaSaha
Copy link
Contributor

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

  • I agree to follow this project's Code of Conduct
@SparshaSaha SparshaSaha added the bug Something isn't working label May 3, 2023
@kelset
Copy link
Member

kelset commented May 3, 2023

submit a PR?

@SparshaSaha
Copy link
Contributor Author

@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.

@tido64
Copy link
Member

tido64 commented May 5, 2023

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.

@SparshaSaha
Copy link
Contributor Author

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?

@kelset kelset added enhancement New feature or request feature: align-deps This is related to align-deps and removed bug Something isn't working needs triage 🔍 labels May 5, 2023
@tido64
Copy link
Member

tido64 commented May 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: align-deps This is related to align-deps
Projects
None yet
Development

No branches or pull requests

3 participants