move @types packages to devDependencies#445
move @types packages to devDependencies#445Jacksondr5 wants to merge 1 commit intokurrent-io:masterfrom
Conversation
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Hi Jackson, The types are included in This is typescript's recommended approach for packages that bundle types: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#packaging-dependent-declarations
The "trust downgrade" problem with It doesn't look like they want to put out a newer version of If you're using typescript and a version of package.json {
// ...
"pnpm": {
"overrides": {
"@kurrent/kurrentdb-client>@types/node": "$@types/node"
}
}
}Which should work fine with our package (I've not tested it), and ensure pnpm only installs types for the version of node you actually use, which hopefully depends on a version of If you're not using typescript at all, you could also tell pnpm not to install node's types from package.json {
// ...
"pnpm": {
"overrides": {
"@kurrent/kurrentdb-client>@types/node": "-"
}
}
}or from any package: package.json {
// ...
"pnpm": {
"overrides": {
"@types/node": "-"
}
}
} |
|
Hey @George-Payne, thanks for the super detailed explanation! I understand the reasoning for including the types packages now. I'll go ahead and close this. |


Moves the types packages in db-client to devDependencies.
Apologies, I'm not familiar with yarn. When I ran
yarn installafter making the change, 2 large plug'n'play files got generated that weren't known to git. I didn't include those changes, but I'm also not sure if some kind of lockfile was supposed to generate. Please let me know if I need to do something different here.The reasoning behind this change is that types packages shouldn't be included in the bundle brought down to repos that install this package. After turning on pnpm's trustPolicy in my repo where we use this package, I got an error about @types/node from this package:

If the types packages get moved to devDependencies, pnpm won't attempt to install them in my repo and this issue goes away.