However, given that koa is also needed when using this package, I somewhat feel like it's a good idea to put it in peerDependencies, just in case? I stumbled upon this error where koa dependency inside this part can't be found:
I am using Yarn 3.6.4 with nodeLinker: pnpm with rather strict setup, so a package needs to be specified explicitly otherwise it can't be "linked". So in this case, since koa is neither added as dependencies or peerDependencies, Yarn can't resolve it, hence making the declare module "koa" not affecting the actual application.
I propose to add this:
"peerDependencies": {
"koa": "^2.14.1"
}
into package.json, so that stricter package managers can pick the module up from inside node_modules. Let me know what you think. Thanks!
Checklist
[x] I have searched through GitHub issues for similar issues.
[x] I have completely read through the README and documentation.
Describe the feature
Currently,
koa
is listed asdevDependencies
here (as it should).https://github.com/koajs/bodyparser/blob/664cd7c413250d5e12eb5bb0fbf4e52d31ef24f5/package.json#L59
However, given that
koa
is also needed when using this package, I somewhat feel like it's a good idea to put it inpeerDependencies
, just in case? I stumbled upon this error wherekoa
dependency inside this part can't be found:https://github.com/koajs/bodyparser/blob/664cd7c413250d5e12eb5bb0fbf4e52d31ef24f5/src/body-parser.ts#L2
I am using Yarn 3.6.4 with
nodeLinker: pnpm
with rather strict setup, so a package needs to be specified explicitly otherwise it can't be "linked". So in this case, sincekoa
is neither added asdependencies
orpeerDependencies
, Yarn can't resolve it, hence making thedeclare module "koa"
not affecting the actual application.I propose to add this:
into
package.json
, so that stricter package managers can pick the module up from insidenode_modules
. Let me know what you think. Thanks!Checklist