-
Notifications
You must be signed in to change notification settings - Fork 137
Unnecessary package.json dependencies #47
Comments
Hello. Sounds good, less dependencies mean less problems. If you have the time a PR of this would be greatly appreciated. If tests pass and the package remains completely usable then it is fine with me. |
The reflect-metadata one is a bug. This caused me cancer and brainfuck. |
We cannot remove the import because of https://github.com/szokodiakos/typegoose/blob/master/src/prop.ts#L176 |
@Ben305 I see you're casting to any here. No strict typing. Therefore reflect-metadata is not required for passing a build. |
We cannot remove it, because:
Without casting to any, the typescript compiler throws an error. I'd like to see a PR if you get it working. |
@Ben305 |
Closing this as it's out of date. |
Why
mongoose
is a real dependency of typegoose? It should be a peerDependency and users should install it by themselves, as they still need to explicitly use it by themselves:So when they use different version than the
typegoose
one, there will be problems with no errors marked by npm - two copies of mongoose in one project.Also, you distribute on npm the compiled version and
"main"
points to"lib/typegoose.js"
which is correct. So why you havetypescript
listed in dependecies? Lib consumers doesn't need this, they can use the lib even with flow+babel, as long as they produce api-compatible js transpiled code.import 'reflect-metadata';
is also not needed in typegoose source - it's only a runtime shim forReflect.metadata
to make TS decorator class type reflection works. Again, users should import it in their entry file as some of them might want to usecore-js
polyfill instead.The text was updated successfully, but these errors were encountered: