Skip to content
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

[feat] add koa as peerDependencies #157

Closed
2 tasks done
imballinst opened this issue Nov 6, 2023 · 0 comments · Fixed by #160
Closed
2 tasks done

[feat] add koa as peerDependencies #157

imballinst opened this issue Nov 6, 2023 · 0 comments · Fixed by #160
Assignees

Comments

@imballinst
Copy link

Describe the feature

Currently, koa is listed as devDependencies here (as it should).

"koa": "^2.14.1",

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:

import type * as Koa from 'koa';

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

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
@3imed-jaberi 3imed-jaberi self-assigned this Apr 7, 2024
@3imed-jaberi 3imed-jaberi linked a pull request Apr 8, 2024 that will close this issue
6 tasks
titanism pushed a commit that referenced this issue Apr 8, 2024
## Description

Fix #155 and #157

## Checklist

- [x] I have ensured my pull request is not behind the main or master
branch of the original repository.
- [x] I have rebased all commits where necessary so that reviewing this
pull request can be done without having to merge it first.
- [x] I have written a commit message that passes commitlint linting.
- [x] I have ensured that my code changes pass linting tests.
- [x] I have ensured that my code changes pass unit tests.
- [x] I have described my pull request and the reasons for code changes
along with context if necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants