-
Notifications
You must be signed in to change notification settings - Fork 61
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
@types/mysql should be in devDepenencies #72
Comments
microsoft/types-publisher#81 states that they should be installed as a dependency so that it's installed without people having to mess around. To me this makes sense. I don't see how mysql types will have any effect on your frontend types. /cc @RetroCraft @move-zig because they added/changed the TypeScript stuff. |
There was a bit of a discussion about this on https://gitter.im/DefinitelyTyped/DefinitelyTyped from Nov 06 19:47 to Nov 07 08:23 (ET, I think). It seems like the consensus was a standard dependency, not devDependency. I think that makes sense. |
The idea is that |
I understand the rationale for this change. Still, there is a reason why many libraries put it in devDependencies after all, and some of these reasons are given in the links you presented. Here are my arguments:
I will try to explain # 3 from our perspective. A variation of our problem is demonstrated also here. We have sever code (Node) and client code (ES5) on the same project tree. Both share the same |
That's pretty key to this issue actually. If my library didn't uncover this problem, another one would have. The fact your workflow is broken because of a bad setup should have no bearing on the correct implementation of my node library. |
I never said our workflow is broken. It is, I agree, questionable. It's way too opinionated to disallow it completely. |
As the maintainer of this library, I can take the liberty of being
opinionated in working against questionable workflows. If I had to cater
for every workflow ever, nothing would get done.
There isn't a vague line between devDependencies and dependencies,
devDependencies are installed when you're doing development on the project
itself (as in if you were to clone this repo and run npm install) and are
not installed when you install a package into your project. As a library,
this is an important differentiation.
…On Tue, 14 Nov 2017, 15:04 Alon Gamliel, ***@***.***> wrote:
I never said our workflow is broken. It is, I agree, questionable. It's
way too opinionated to disallow it completely.
I also didn't claim that types are not dependencies. They are indeed. But
there is vague line between dependencies and devDependencies, and since
they are not runtime dependencies one can argue that they are
devDependencies.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEjy1Gw9l_FmXKpcVsW_PMrC9y-NwiNmks5s2awCgaJpZM4Qb-JL>
.
|
@gamliela Is there any reason why you can't write |
@RetroCraft No specific reason. It's just a lot of places to change, and also the problem occurs in other variations (e.g. |
@types
inclusion should be optional.Use case: in our project we share code for client and server, and server types conflict with client types. Consider
setInterval
, which has different return type on Node and DOM.Also, I think that this is the convention for many libraries, since TypeScript in general is optional.
The text was updated successfully, but these errors were encountered: