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

Handle @types/styled-components dependency/peerDependency #985

Closed
penx opened this issue Sep 17, 2021 · 2 comments · Fixed by #990
Closed

Handle @types/styled-components dependency/peerDependency #985

penx opened this issue Sep 17, 2021 · 2 comments · Fixed by #990
Milestone

Comments

@penx
Copy link
Member

penx commented Sep 17, 2021

When users install govuk-react, there should be a clear path to installing @types/styled-components so that types work.

Perhaps this is a peerDependency on govuk-react and @govuk-react/lib

I don't think we want it as a dependency, as styled-components is a peerDependency so the version wouldn't be known.

@penx penx added this to the 0.9.2 milestone Sep 17, 2021
@penx
Copy link
Member Author

penx commented Sep 20, 2021

Note rollup removed their types dependencies due to global conflicts

rollup/rollup#3395

Note on types dependencies here, but this doesn't apply to types dependencies of peerDependencies

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#dependencies

@penx
Copy link
Member Author

penx commented Sep 20, 2021

As styled-components is a peerDependency, the types should either be a peer dependency or nothing.

Personally I feel that if the peer application is using TypeScript and styled-components, it should be straight forward to install @types/styled-components without being nudged to do so by peerDependencies.

As such I think the main thing to do here is:

  • add a note in the installation section of the readme
  • see how we get on with that and perhaps add to peerDepdencies in future if there's a clear issue/reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant