-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dist files contain references to @nextcloud/typings
put is not declared as peer dep
#609
Comments
@nextcloud/typings
put is not declared as peer dep@nextcloud/typings
put is not declared as peer dep
I am still not sure if peer dependency or plain dependency is the correct way, what do you think? |
Peer is automatically installed if you import the library. |
Peer means it's pushed down as dependency of packages that require this package. I don't think that is necessary. The typings are a dev dep of this package. |
But they end up in the dist folder. Which still generates errors for other packages. |
Same issue with the router
|
If typings are part of Peer dependencies might create a dependency hell. Imagine we have to packages @nextcloud/a and @nextcloud/b. @nextcloud/a depends on typings v3, @nextcloud/b uses typings v4. If they had the typings as peer dependencies, an app would not be able to install a and b because it would become impossible to satisfy both a's and b's requirements. |
We also can't be the first ones to run into this. I'm sure other packages faced the same challenge. |
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#dependencies so regular dependencies it is. |
Example: https://www.runpkg.com/?@nextcloud/l10n@2.1.0/dist/registry.d.ts
Importing and building might/will generate errors in other libs if they don't use
@nextcloud/typing
themselvesRef nextcloud-libraries/nextcloud-files#621
cc @ChristophWurst @susnux
The text was updated successfully, but these errors were encountered: