Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add @types/express and fastify to dependencies
WIthout @types/express and fastify being in dependencies, the module fails to start and the client is forced to install the missing one on their own.
- Loading branch information
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmcdo29 I was wondering about this. I wanted to give this logger a try but it didn't feel right to be taking dep's on
fastify
and@types/express
. I assume you can't make them devDependencies because they won't be packaged? But ideally I'd like them not to be shipped with my module as well. Is there another way around this?9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably look into how Nest takes care of the dependencies on both underlying frameworks and their types. For the moment because I need the ability to determine the type for intellisence on the methods I have them under dependencies. I do agree though that there should be a better way to manage this. If you figure something out, let me know. I'll see what I can find in the meantime.
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah. Good point. We are taking those dependencies anyway because NestJs is. At least fastify.
https://github.com/nestjs/nest/blob/master/package.json#L61
@types/express is a devDependency.
https://github.com/nestjs/nest/blob/master/package.json#L97
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe in Nest's case, no Express typings are explicitly used, but I'll have to double check the codebase to be sure and that could take some time
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you may be right. Also I looked at the
nest
repo but I don't actually depend on that repo. Here are my nest modulesAnd none seem to rely on Fastify. I'm gonna give your logger a shot. If I have some time I'll try to set some aside to look into what nest does with fastify types. If anything.
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for giving it a shot! If you find anything else, let me know and I'll see if I can address it
9fa3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @greenreign, just got around to releasing v2.0.5 that has no dependencies on fastify or @types/express. Feel free to give it a shot and log an issue if there is a problem 😄