You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/01 15:38:48 UTC

[GitHub] [incubator-superset] ktmud edited a comment on pull request #10750: chore: moving all @types dependencies to dev dependencies

ktmud edited a comment on pull request #10750:
URL: https://github.com/apache/incubator-superset/pull/10750#issuecomment-684940998


   My understanding is `@types/*` should always be in `dependencies` for libraries because you don't want your dependent package to not have out-of-the-box typing---it may be hard for library users to keep track of which additional `@types/*` are needed.
   
   Since all NPM packages are presumed to be a "library" if they are going to be published, we always put `@types` in `dependencies` by default.
   
   For the `superset-frontend` app though, or any other npm-managed frontend apps for that matter, is not going to be published as a library, so it's OK to put `@types` in either place. In fact, one may even argue it's probably preferred to put all dependencies in only one of `dependencies` or `devDependencies`, since
   
   1. If we consider the source code the published product of the app, we may want `NODE_ENV=production npm install && npm build` to work as well. So `dependencies` is preferred.
   2. If we consider the built assets the published product of the app, we may want to put them all in `devDependencies` for consistency and simplicity.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org